0

我在另一个 UITableView 内的水平 UITableView 中有一个按钮。当我点击按钮时,应用程序崩溃并显示此消息“无法识别的选择器已发送到实例”。据我了解,问题是另一个类处理水龙头,但我不知道如何解决它。

4

1 回答 1

0

我刚刚解决了。也许有人会需要我的解决方案。我搬家了

[self.checkBoxButton addTarget:self action:@selector(checkBoxButtonAction) forControlEvents:UIControlEventTouchUpInside]; 

从视图(实际上显示此视图而不是单元格

[单元格添加子视图:CellView.view];

) 到 UITableView 类

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

并改变了一点

[CellView.checkBoxButton addTarget:self action:@selector(checkBoxButtonAction) forControlEvents:UIControlEventTouchUpInside];

所以,现在点击句柄不是视图而是 uitableview 类,一切正常

于 2012-09-05T12:39:22.103 回答