Iphone 从SearchDisplayController推送到新视图

Iphone 从SearchDisplayController推送到新视图,iphone,ios,objective-c,xcode,Iphone,Ios,Objective C,Xcode,试图从搜索结果推送到新视图,但由于某种原因代码没有被调用。对不起,我不能再详细描述了 代码如下: -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ [self.table deselectRowAtIndexPath:indexPath animated:YES]; int selectedTemplateID = [((CollectionItem*)[cllc

试图从搜索结果推送到新视图,但由于某种原因代码没有被调用。对不起,我不能再详细描述了

代码如下:

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[self.table deselectRowAtIndexPath:indexPath animated:YES];
int selectedTemplateID = [((CollectionItem*)[cllct objectAtIndex:indexPath.row]).tID intValue];

ACollection *newView = [[ACollection alloc] initWithID:selectedTemplateID];
newView.template = [cllct objectAtIndex:indexPath.row];

if(tableView == self.table) {
    [self.navigationController pushViewController:newView animated:YES];
    newView.theTitle = [self.table cellForRowAtIndexPath:indexPath].textLabel.text;
}
if(tableView == self.searchDisplayController.searchResultsTableView) {
    NSLog(@"Should push");
    [self.navigationController pushViewController:newView animated:YES];
    newView.theTitle = [self.table cellForRowAtIndexPath:indexPath].textLabel.text;
  }

}

谢谢

首先检查tableview的数据源和数据删除。
删除
[self.table取消行索引路径:索引路径:是]并检查一次。

是否设置了TableVIewDelegate?使用断点检查此方法是否调用/?如果调用了委派方法,则应用程序导航是基于还是基于视图?我已设置了我的Table delegate。无论如何,我相信是这样。我用过断点,但没有人叫它。我相信我的应用程序是基于导航的。请尝试将tableview与标记进行比较