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 關注
- 138 瀏覽
添加回答
舉報
0/150
提交
取消