I have a stack of UITableViews managed by a UINavigationController. When I try calling indexPathForSelectedRow on any of the previous UITableViews, I always get nil:
NSEnumerator *e = [[navigationController viewControllers] objectEnumerator];
UITableViewController *controller;
while (controller = [e nextObject]) {
NSIndexPath *selectedIndexPath = [[controller tableView] indexPathForSelectedRow]; // always nil
// ...
}
I can't find anything about this behavior in Apple's docs; is it intentional? If so, is there another way to do what I'm trying to do, without me having to resort to manually managing a redundant mySelectedIndexPath instance variable inside didSelectRowAtIndexPath or somesuch?