开发者

How to create a TableView without a deletion control?

开发者 https://www.devze.com 2023-01-18 13:18 出处:网络
When a table view goes into editing mode, it shows the delete controls on the left, and also reordering controls on the right.

When a table view goes into editing mode, it shows the delete controls on the left, and also reordering controls on the right.

I have no need for deleting the rows, hence I return UITableViewCellEditingStyleNone for -(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPa开发者_StackOverflow社区th.

But doing so merely hides the red delete control. The table row will still be indented when I go into editing mode. Is it possible to hide the deletion control completely?


You need to also return NO for – tableView:shouldIndentWhileEditingRowAtIndexPath:.

0

精彩评论

暂无评论...
验证码 换一张
取 消