首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更新Xcode4.4后,didSelectRowAtIndexPath未运行

更新Xcode4.4后,didSelectRowAtIndexPath未运行
EN

Stack Overflow用户
提问于 2012-09-07 10:56:57
回答 1查看 79关注 0票数 0

我从4.3更新了Xcode 4.4。我在"iPhone 5.1模拟器“上运行一个项目。

我可以做一个项目。但我点击了一个UITableView的tableCell。

因此,我在“didSelectRowAtIndexPath”方法的顶部添加了"NSLog()“。但没有显示该日志。

我看不到下一个视线。

我能为transition的tableView做些什么?

代码语言:javascript
复制
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    NSLog(@"(NSInteger *)indexPath.row=%d", indexPath.row);    
    NextViewController *nextViewController = [[NextViewController alloc]initWithNibName:@"NextViewController" bundle:nil];
    nextViewController.dicPatient = self.dicPatient;
    nextViewController.dicLoginKey = self.dicLoginKey;
    nextViewController.cellIdx = (NSInteger *)indexPath.row;
    [tableView deselectRowAtIndexPath:indexPath animated:YES];    
    [self.navigationController pushViewController:nextViewController animated:YES];

}

附注:

这个项目是在Xcode4.2上完成的。

当然,在项目运行之前,我做了Clean&Build。

我的操作系统是Lion

EN

回答 1

Stack Overflow用户

发布于 2012-09-07 11:57:03

检查一下这些东西。在你的头文件中

代码语言:javascript
复制
<UITableViewDelegate>

在您的实现文件中

代码语言:javascript
复制
your_table_view.delegate=self;

或者,如果您已经从接口构建器添加了tableView,则打开xib文件。选择您的表,然后在utilites栏中单击connections检查器,然后在outlets部分中将委派分配给File的所有者

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12311122

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档