iPhone SDK: selectRowAtIndexPath with delegate methods
- by norskben
Hi SO
I am using selectRowAtIndexPath to select a tableview in the same ViewController class, but this does not run the delegate methods, eg: tableView:didSelectRowAtIndexPath
I would like these delegate methods to also be called. Is there another API call I can be using?
Thanks
From the apple docs:
selectRowAtIndexPath:animated:scrollPosition:
Selects a row in the receiver identified by index path, optionally scrolling the row to a location in the receiver.
- (void)selectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(UITableViewScrollPosition)scrollPosition
Calling this method does not cause the delegate to receive a tableView:willSelectRowAtIndexPath: or tableView:didSelectRowAtIndexPath: message, nor will it send UITableViewSelectionDidChangeNotification notifications to observers.