1

我使用 segues 来推动单元格和详细信息披露按钮。我无法点击索引,因为详细信息披露按钮“拦截”了触摸。

在此处输入图像描述

代码:

- (void)prepareForSegue:(UIStoryboardSegue *)segue
                 sender:(id)sender {
    NSIndexPath *indexPath = [self.tableView indexPathForCell:sender];
    if ([segue.identifier isEqualToString:@"Dossier Segue"]) {
        Person *person = [[self fetchedResultsController] objectAtIndexPath:indexPath];
        DSRevealViewController *vc = (DSRevealViewController *)segue.destinationViewController;
        vc.person = person;
        vc.transitioningDelegate = self;
    }
    else if ([segue.identifier isEqualToString:@"Info"]) {
        Person *person = [[self fetchedResultsController] objectAtIndexPath:indexPath];
        NSAssert(person, @"Person is nil");
        PersonInfoViewController *vc = (PersonInfoViewController *)segue.destinationViewController;
        vc.person = person;
    }
}

PS我检查了我的另一个应用程序,我使用表格视图委托方法而不是segues,它运行良好。

4

0 回答 0