问题标签用户 UItableView 点击不回调didSelect iosuitableview 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 self.authTable = [[UITableView alloc]initWithFrame:tableRect style:UITableViewStyleGrouped]; self.authTable.delegate = self; self.authTable.dataSource = self; self.authTable.clipsToBounds = NO; [self.view addSubview:self.authTable];- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ if(indexPath.section==0){ //修改照片 UIImagePickerController * picker = [[UIImagePickerController alloc]init]; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; picker.delegate = self; [self presentModalViewController:picker animated:YES]; } ....... self.authTable = [[UITableView alloc]initWithFrame:tableRect style:UITableViewStyleGrouped]; self.authTable.delegate = self; self.authTable.dataSource = self; self.authTable.clipsToBounds = NO; [self.view addSubview:self.authTable];- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ if(indexPath.section==0){ //修改照片 UIImagePickerController * picker = [[UIImagePickerController alloc]init]; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; picker.delegate = self; [self presentModalViewController:picker animated:YES]; } .......这样看是没问题的,是不是你的点击事件被其他视图消耗掉了? 应该是手势冲突,你把表格选中代理方法中的: if(indexPath.section==0){ //修改照片 UIImagePickerController * picker = [[UIImagePickerController alloc]init]; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; picker.delegate = self; [self presentModalViewController:picker animated:YES]; }把这段代码注释掉,再试试,看能不能调进去 self.authTable = [[UITableView alloc]initWithFrame:tableRect style:UITableViewStyleGrouped]; self.authTable.delegate = self; self.authTable.dataSource = self; self.authTable.clipsToBounds = NO; [self.view addSubview:self.authTable];- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ if(indexPath.section==0){ //修改照片 UIImagePickerController * picker = [[UIImagePickerController alloc]init]; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; picker.delegate = self; [self presentModalViewController:picker animated:YES]; } .......这样看是没问题的,是不是你的点击事件被其他视图消耗掉了?嗯,谢谢,解决了,是下层页面的单击手势拦截了UItableview的didSelect事件, iphone 如何审核发布 带有激活码的程序? 请教一个xcode使用的问题 关于self和"_XXX"的问题 请教一个xmpp配置的问题 Plist文件 ipad播放h5 video标签视频时 如何取消内联样式?求大神教育。 新手求ios大牛解答 用什么语言可以很好的移植一个android平台的APP倒IOS 如何用Python实现ios自动刷抖音,看视频。 flutter IOS(越狱)下 U3D 游戏 C#-DLL 的代码热更新 是否可行? 在Xcode环境中,一个View上需要画一个表格,这个表格的线怎么画啊?
self.authTable = [[UITableView alloc]initWithFrame:tableRect style:UITableViewStyleGrouped];
self.authTable.delegate = self;
self.authTable.dataSource = self;
self.authTable.clipsToBounds = NO;
[self.view addSubview:self.authTable];- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section==0){
//修改照片
UIImagePickerController * picker = [[UIImagePickerController alloc]init];
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.delegate = self;
[self presentModalViewController:picker animated:YES];
}
.......
self.authTable = [[UITableView alloc]initWithFrame:tableRect style:UITableViewStyleGrouped];
self.authTable.delegate = self;
self.authTable.dataSource = self;
self.authTable.clipsToBounds = NO;
[self.view addSubview:self.authTable];- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section==0){
//修改照片
UIImagePickerController * picker = [[UIImagePickerController alloc]init];
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.delegate = self;
[self presentModalViewController:picker animated:YES];
}
.......
这样看是没问题的,是不是你的点击事件被其他视图消耗掉了?
if(indexPath.section==0){
//修改照片
UIImagePickerController * picker = [[UIImagePickerController alloc]init];
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.delegate = self;
[self presentModalViewController:picker animated:YES];
}
把这段代码注释掉,再试试,看能不能调进去
self.authTable = [[UITableView alloc]initWithFrame:tableRect style:UITableViewStyleGrouped];
self.authTable.delegate = self;
self.authTable.dataSource = self;
self.authTable.clipsToBounds = NO;
[self.view addSubview:self.authTable];- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section==0){
//修改照片
UIImagePickerController * picker = [[UIImagePickerController alloc]init];
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.delegate = self;
[self presentModalViewController:picker animated:YES];
}
.......
这样看是没问题的,是不是你的点击事件被其他视图消耗掉了?嗯,谢谢,解决了,是下层页面的单击手势拦截了UItableview的didSelect事件,