Jia*_*ang 1 objective-c storyboard uitableview ios
环境:Xcode 6.1.1;故事板问题:我正在使用嵌入UIViewContrller instoryboard的UITableView创建一些列表,并且无法通过点击选择所有单元格,但可以通过长按意外选择.我不知道为什么,我无法弄清楚.我希望有人帮助我.想.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
HBillCell *cell = [tableView dequeueReusableCellWithIdentifier:@"billCell"];
[cell loadInfo:self.dataSource[indexPath.row]];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[self performSegueWithIdentifier:@"bill2detail" sender:nil];
}
谢谢大家.由于我自己在基类中的视图控制器的根视图上添加了轻击手势,因此出现此问题.
- (void)viewDidLoad {
[super viewDidLoad];
UITapGestureRecognizer *tgr = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapBlankAction:)];
tgr.delegate = self;
[self.view addGestureRecognizer:tgr];
}
Run Code Online (Sandbox Code Playgroud)
我想通了.
| 归档时间: |
|
| 查看次数: |
575 次 |
| 最近记录: |