亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

我自定義accessoryButton的圖片,但是Delegate么有響應,哪弄錯了?

我自定義accessoryButton的圖片,但是Delegate么有響應,哪弄錯了?

iOS
萬千封印 2023-04-15 18:14:24
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設置對應的事件自己處理好了。


查看完整回答
反對 回復 2023-04-17
  • 1 回答
  • 0 關注
  • 138 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號