Faking a UITableView selection
- by John Smith
I have a UITableView where a selection displays some cool stuff in another part of the display. I tried to fake a keypress by writing:
NSIndexPath *ip = [NSIndexPath indexPathForRow: 1 inSection:0];
[tableView selectRowAtIndexPath:ip animated:NO scrollPosition:UITableViewScrollPositionTop ];
[self tableView:tableView didSelectRowAtIndexPath:ip];
…