views:

251

answers:

1

The documentation is not really clear about this. Why is the UITableViewDataSource asked to provide the section index for an index-bar section title?

I mean... what use cases make this method important? When is this called and why?

+3  A: 

Basically, it defines which section the table view scrolls to when you click on the specified section index title. Let's say you define your index titles as the letters A through Z, but you don't actually have items for each letter. In -tableView:sectionForIndexTitle:atIndex:, you would specify the next section that has an item.

Jeff Kelley