You can check if the table view data source responds to a selector sectionIndexTitlesForTableView:(which the data source for the indexed table view should implement):
if ([tableView.dataSource
respondsToSelector:@selector(sectionIndexTitlesForTableView:)])
{
NSArray *result =
[tableView.dataSource sectionIndexTitlesForTableView:tableView];
if (result != nil)
NSLog(@"tableView is currently indexed");
else
NSLog(@"tableView is not currently indexed");
}
else
NSLog(@"tableView does not implement indexing");
, , , , - ( , - ).