1

を使用してiPhoneアプリで作業していUITableViewます。UIViewControllerサブビュー UITableViewに編集オプションを追加しました。このシナリオのユーザーswipe the screen the Delete button is showingがバーボタンの項目「編集」を「完了」に変更したとき。この場合、デリゲートの下からコントロールを追跡しました。

- (UITableViewCellEditingStyle)tableView:(UITableView *)aTableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
-(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath

しかし、ユーザーが再びビューをスワイプすると、「削除」ボタンが非表示になりますが、コントロールをトリガーできません。バーボタンの項目「Done」を「Edit」に変更できないように。この問題を解決するのを手伝ってくれませんか? 「削除」オプションを非表示にするスワイプ コントロールをどこでトリガーできますか? 前もって感謝します。

4

1 に答える 1

1

これは機能しますか?:

- (void)tableView:(UITableView *)tableView didEndEditingRowAtIndexPath:(NSIndexPath *)indexPath
{
    // update button title here
}
于 2012-09-04T07:09:24.970 に答える