解决方案 »
- 是否应该去培训 IOS ????????????????
- UITabBarController和UINavigationController中跳转页面的问题
- 请教hadoop问题
- 跪求大神帮助,X宝买的IPAD3还原后遇到ID锁无法激活了
- 关于如何关闭键盘的小问题
- 如何画不规则曲线,以及判断某个点是否在这2条曲线之内?
- a.swift 怎么调用 b.swift?
- IOS iphone 大神,请问xcode 上的iphone 模拟器 怎么实现模拟打电话啊
- ios8.0弃用了UISearchDisplayController推荐使用UISearchController,关键是不会用啊~
- 询问下twitter分享相关的疑问
- 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事件,