I would get an array for the sections, the sections themselves would be represented as a dictionary with two keys: the section header (string) and the contents (array).
Would write a view method
- (void)updateSectionsWithReceivedItems:(NSArray *)items_from_server;
in which I would parse the data obtained by a super-secret algorithm into sections (using, for example, NSPredicate
to filter objects by some parameters), which I would write to the array conceived in step 1.
Well, and then for the methods UITableViewDataSource
– tableView:cellForRowAtIndexPath: – numberOfSectionsInTableView: – tableView:numberOfRowsInSection: – sectionIndexTitlesForTableView: – tableView:sectionForSectionIndexTitle:atIndex: – tableView:titleForHeaderInSection: – tableView:titleForFooterInSection:
used the formed array of sections.
Generally an ambiguous question, as for me - not enough specifics.
PS Tell me, what kind of profile and where can I find it?