Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

beachdog

macrumors member
Original poster
The UITableView reference says "A table view can have an index that appears as a bar on the right hand side of the table (for example, "a" through "z")", which is exactly what I want. But I don't see how to do it. Can someone offer some pointers on this?
 
The UITableView reference says "A table view can have an index that appears as a bar on the right hand side of the table (for example, "a" through "z")", which is exactly what I want. But I don't see how to do it. Can someone offer some pointers on this?

Here is the documentation from the UITableView.h file

Code:
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView; // return list of section titles to display in section index view (e.g. "ABCD...Z#")
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index;  // tell table which section corresponds to section title/index (e.g. "B",1))

You just simply give it an array of data (which you would use for your table anyways). I am not sure how to implement images though 🙄
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.