2016-07-18 5 views
0

添付のスクリーンショットに示すように、両方の機能が同時に必要です。 move Rowdeleteと同時にUITableViewにあります。 私はこのself.myTable.editing = YES;UITableViewで行を移動して同時に行を編集することができます

- (BOOL)tableView:(UITableView *)tableview canMoveRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    return YES; 
} 

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { 
    return YES; 
} 

プロパティを設定するが、私は、私は、これらの上記のコードを使用して移動行を行うことができることはできません。 私の質問は。

  • 両方の機能を同時に使用できます(ドラッグして行を入れ替えて移動すると削除できます)。
  • 私はどのようにして両方を同時に達成することができないのですか(削除ボタンは行の左側に表示されるかもしれません)?

この問題に直面し、このようなことをしたヘルプを探してください。おかげさまで

答えて

0

はいあなたは、あなただけの、おそらく以下の方法逃していることができます。

スウィフト3:

func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) 

のObjective C:

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath; 
関連する問題