UIImage *accessoryImage = [UIImage imageNamed:@"acc_bg.png"];UIImageView *accImageView = [[UIImageView alloc] initWithImage:accessoryImage];
accImageView.userInteractionEnabled = YES;
[accImageView setFrame:CGRectMake(0, 0, 28.0, 28.0)];self.accessoryView = accImageView;
[accImageView release];tableView:accessoryButtonTappedForRowWithIndexPath: 没有响应
1 回答
四季花海
TA贡献1811条经验 获得超5个赞
官方文档
Discussion The delegate usually responds to the tap on the disclosure button (the accessory view) by displaying a new view related to the selected row. This method is not called when an accessory view is set for the row at indexPath.
所以你可以不用UIImageView而直接使用一个UIButton,然后给这个button设置对应的事件自己处理好了。
- 1 回答
- 0 关注
- 109 浏览
添加回答
举报
0/150
提交
取消