私はプレイリストに曲を追加するときにiPodのアプリのように各セルに '+
'ボタンがあるTableViewを実装しようとしています。 cell.accesoryType
はどのようにこれは4つだけの値AccessoryType TableViewの "Plus"ボタンを追加
UITableViewCellAccessoryCheckmark
UITableViewCellAccessoryDetailDisclosureButton
UITableViewCellAccessoryDisclosureIndicator
と
None
を
を行うことができたのか?カスタムボタンを作成してcell.accessoryView
を設定する必要がありますか、これを行う別の方法がありますか?あなたがcustom cell
を作成する場合にも、「画像を見る」とgetよう
解決策UIButton *ボタン= [UIButton buttonWithType:UIButtonTypeContactAdd]; [ボタンaddTarget:自己アクション:@セレクタ(buttonTapped:イベント:) forControlEvents:UIControlEventTouchUpInside]; cell.accessoryView = button; を作成し、イベント処理手順を作成しました - (void)buttonTapped:(id)送信者イベント:(id)イベント{ } – teo