我已经在 AppDelegate 中实现了 createCellForTableview: 方法,该方法创建单元格,将适当的 UIButton 作为附件视图添加到单元格并将单元格返回给控制器。在我的 viewController 中,我正在创建附件视图的实例并将目标添加到按钮作为休闲:
button = (UIButton *)cell.accessoryView;
[button setTitle:@"access" forState:UIControlStateNormal];
[button setTitle:@"access" forState:UIControlEventTouchUpInside];
[button addTarget:self action:@selector(accessButtonTapped:event:) forControlEvents:UIControlEventTouchUpInside];
我的问题是,没有调用按钮操作。请帮我解决这个问题。
提前致谢