Hey, I have sectionIndexTitlesForTableView implemented in my controller class. when I selected an index, I want to have my custom action. Is there a way to do it?
+1
A:
I think what you are wanting is something to happen when you select an item in the table?
implement the delegate method
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
Warren Burton
2010-08-03 15:25:50
nope, there is sectionIndexTitlesForTableView, which will enabled the index on right side of the table
David Gao
2010-08-06 19:46:08
+1
A:
I don't think you can override the default behavior of the index, nor do I think doing so a good idea. It's meant as a shortcut to jump to a specific section in the table, and is used as such in every other app that uses section indexes—what custom behavior do you want, exactly?
Noah Witherspoon
2010-08-03 15:53:37
basically in my app i am using facebook graph api to load list of friends and their pictures. For loading pictures I am doing in a way that when user scrolls the table, it will check the visible rows.Based on visible rows in UITableView, I will partially load each friend's display picture.So accomplish this feature, I am using UIScrollView's delegate methods- (void) scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate;- (void) scrollViewDidEndDecelerating:(UIScrollView *)scrollView;But I can't do it for sectionIndexTitlesForTableView.
David Gao
2010-08-10 14:49:23