【发布时间】:2014-06-09 22:16:42
【问题描述】:
我有一个从 RootViewController 推送的 UITableViewController。在 UITableViewController 的 UITableView 中,我使用了一个自定义单元格,该单元格左侧有一个带有框架的按钮:CGRectMake(0,0,30,30)。
好像当我设置 self.navigationController.interactivePopGestureRecognizer.enabled = NO;在 UITableViewController 中,接收到按钮的触摸事件,但如果我将其设置为启用 = YES,则按钮上的触摸事件将丢失:
这是我在自定义 tableviewcell 中创建按钮的代码。
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(0,0,30,30);
[button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:button];
任何关于如何解决此问题的想法/建议将不胜感激!
谢谢。
【问题讨论】:
标签: ios uitableview uinavigationcontroller uibutton uigesturerecognizer