Hi, kolywater,
Great idea to remove all code from didSelectRowAtIndexPath. When I do that, the highlighting happens immediately upon touch. When the code is there, there is a delay, and the highlight happens just before the new view slides into position. I want the highlight to happen first, and then have the iphone do the processing to load the new view.
Here is the code:
BeforeAfterViewController *beforeAfterViewController = [[BeforeAfterViewController alloc] initWithNibName:@"BeforeAfters" bundle:nil];
beforeAfterViewController.title = [self.listData objectAtIndex:[indexPath row]];
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleBordered target:nil action:nil];
[self.navigationController pushViewController:beforeAfterViewController animated:YES];
[beforeAfterViewController release];
Here's a secondary question, if I may, which seems related. Each table row has a UITableViewCellAccessoryDetailDisclosureButton. Tapping the button takes the user to the same new view as touching the row. But picture this: the user touches row #1. Row #1 highlights and the new view slides into place. User hits the back button to see the table again. Row #1 is still highlighted. Now the user hits the accessory button on row #4. New view slides into place. But when he hits the back button to get back to the table, row #1 is still highlighted, because hitting the accessory button in row #4 did not highlight its row.
Maybe if I can force a row to highlight when that row's accessory button is tapped, I can force the highlight when the row itself is tapped?
--Steve