cocoaTouch/MasterViewController.m
changeset 3364 e5403e2bf02c
parent 3357 3836a31879e7
child 3405 8fdb08497bf1
equal deleted inserted replaced
3363:bcd6d76db4f7 3364:e5403e2bf02c
    95 #pragma mark -
    95 #pragma mark -
    96 #pragma mark Table view delegate
    96 #pragma mark Table view delegate
    97 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    97 -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    98     int newRow = [indexPath row];
    98     int newRow = [indexPath row];
    99     int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
    99     int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
   100     UIViewController *nextController;
   100     UIViewController *nextController = nil;
   101     
   101     
   102     if (newRow != oldRow) {
   102     if (newRow != oldRow) {
   103         [self.tableView deselectRowAtIndexPath:lastIndexPath animated:YES];
   103         [self.tableView deselectRowAtIndexPath:lastIndexPath animated:YES];
   104         [detailViewController.navigationController popToRootViewControllerAnimated:NO];
   104         [detailViewController.navigationController popToRootViewControllerAnimated:NO];
   105         
   105