ios - Disable delete but enable move cells in UITableView -


i'm aware of 2 methods

- (bool)tableview:(uitableview *)tableview caneditrowatindexpath:(nsindexpath *)indexpath {     return indexpath.section == 0; }  - (bool)tableview:(uitableview *)tableview canmoverowatindexpath:(nsindexpath *)indexpath {      return yes; } 

but how can disable delete enable move cells in uitableview?

try adding below delegate methods code.

- (uitableviewcelleditingstyle)tableview:(uitableview *)tableview editingstyleforrowatindexpath:(nsindexpath *)indexpath{     return uitableviewcelleditingstylenone;  }  - (bool)tableview:(uitableview *)tableview shouldindentwhileeditingrowatindexpath:(nsindexpath *)indexpath {     return no; } 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -