equal
deleted
inserted
replaced
116 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
116 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
117 int newRow = [indexPath row]; |
117 int newRow = [indexPath row]; |
118 int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : 0; |
118 int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : 0; |
119 |
119 |
120 if (newRow != oldRow) { |
120 if (newRow != oldRow) { |
|
121 [self.tableView deselectRowAtIndexPath:lastIndexPath animated:YES]; |
121 [detailViewController.navigationController popToRootViewControllerAnimated:NO]; |
122 [detailViewController.navigationController popToRootViewControllerAnimated:NO]; |
122 |
123 |
123 UITableViewController *nextController = [self.controllers objectAtIndex:[indexPath row]]; |
124 UITableViewController *nextController = [self.controllers objectAtIndex:[indexPath row]]; |
124 [detailViewController.navigationController pushViewController:nextController animated:YES]; |
125 [detailViewController.navigationController pushViewController:nextController animated:NO]; |
125 self.lastIndexPath = indexPath; |
126 self.lastIndexPath = indexPath; |
126 [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; |
127 [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; |
127 } |
128 } |
128 [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; |
|
129 } |
129 } |
130 |
130 |
131 |
131 |
132 #pragma mark - |
132 #pragma mark - |
133 #pragma mark Memory management |
133 #pragma mark Memory management |