【发布时间】:2012-09-05 20:39:22
【问题描述】:
我在另一个 UITableView 内的水平 UITableView 中有一个按钮。当我点击按钮时,应用程序崩溃并显示此消息“无法识别的选择器已发送到实例”。据我了解,问题是另一个类处理水龙头,但我不知道如何解决它。
【问题讨论】:
-
您应该发布一些代码以获取更多信息..
-
感谢您花费的时间,但我已经解决了
标签: ios uitableview
我在另一个 UITableView 内的水平 UITableView 中有一个按钮。当我点击按钮时,应用程序崩溃并显示此消息“无法识别的选择器已发送到实例”。据我了解,问题是另一个类处理水龙头,但我不知道如何解决它。
【问题讨论】:
标签: ios uitableview
我刚刚解决了。也许有人会需要我的解决方案。 我搬家了
[self.checkBoxButton addTarget:self action:@selector(checkBoxButtonAction) forControlEvents:UIControlEventTouchUpInside];
从视图(实际上显示的是这个视图而不是单元格
[单元格addSubview:CellView.view];
) 到 UITableView 类到
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
稍微改变了一点
[CellView.checkBoxButton addTarget:self action:@selector(checkBoxButtonAction) forControlEvents:UIControlEventTouchUpInside];
所以,现在点击句柄不是视图而是 uitableview 类,一切正常
【讨论】: