Users Pricing

forum

Home Forums How to set different section titles in UITableView in Objective-C? – MindStick

How to set different section titles in UITableView in Objective-C?

Anonymous User 2799 28 Feb 2016

I have created an Contact application and displaying it into the UITableVIew. I want to display the contact names in different sections with different section titles.
currently I am using numberOfSectionsInTableView: the table view delegate method for managing sections, like this:

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

but as you can see that currently I am returning 1 which is creating only one section. My main problem is to display different section titles, So can you tell me that how can we set the section headers without repeating titles?


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md