Tableview section By Date

2 Solutions Collect From Internet About “Tableview section By Date”

Have a look at the DateSectionTitles sample app. It demonstrates a tableview with date cells grouped by the month. It is based on CoreData.

Screenshot of DateSectionTitles

First of all you need to find reasonable date groups: month, week, year-month combination etc. After that you’ll have to find a method which can determine which of your cell has to go to which group/section, described as an NSIndexPath. numberOfSections as well as numberOfRowsInSection has to reflect your grouping idea. With the UITableViewDataSource protocol you can provide the names for your sections with titleForHeaderInSection:.