Custom button for edit state of UITableView
The stan开发者_高级运维dard behaviour for the editing state of a UITableView is to show a red minus, which when tapped brings up a delete button. Is there a way to customize this, whereby the minus button is a custom one, and the 'delete' confirmation does not appear?
To remove or change (but still use a standard editing accessory), use:
cell.editingAccessoryType = UITableViewCellEditingStyleNone;
To provide your own image/view, use:
cell.editingAccessoryView = yourView; //yourView can be an UIImageView
You could customize the whole edit process: Add a edit-Button to the nav bar. Add an action. On action change the appearance of the cells as you like. Call reloadData.
精彩评论