Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
UIView指定されたにを追加しUITableViewCellてから、に2つの自己定義ボタンを追加しましたUIView。現れた問題は、ボタンをタップしてもメソッドに応答しないことでした。
UIView
UITableViewCell
ボタンの作成中にタッチアップ インサイド イベント (または使用するイベント) のターゲットを追加しましたか?
[tempButton addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside]; - (void) buttonPressed:(UIButton *) sender { //Your implementation }