編集アクションを持つ UITableViewCell で左にスワイプするのと同等のことをプログラムでトリガーする方法はありますか? [tableView setEditing:YES animated:YES]
これは、そのメソッドがテーブル全体を編集モードに設定し、単一の行の編集アクションではなく、挿入/削除左アクセサリ ビューおよび/または並べ替えコントロールを表示するという単純なものとは異なります。
1559 次
1 に答える
-2
UITableViewDelegateoptional func tableView(_ tableView: UITableView, editingStyleForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCellEditingStyle
から使用できます。スワイプしたいセルに戻ります。スワイプをトリガーしたいときにそのセルをリロードするために使用します。UITableViewCellEditingStyleDelete
func reloadRowsAtIndexPaths(_ indexPaths: [NSIndexPath], withRowAnimation animation: UITableViewRowAnimation)
于 2016-03-19T15:13:53.227 に答える