I have an iPhone app that uses a UITableView with the UITableViewDelegate/UITableViewDataSource protocols. I'm struggling to do multi-select for deletion (not checkboxes, just the standard "-" delete button).
The basic problem is that when I click "edit," put the table view into edit mode, and then start clicking "-" buttons, I can only ever have one rotate to pipe ("|") position at a time.
Every time I select a different row for deletion, the last one I chose rotates back to ("-") -- "do not delete" -- position.
The delete buttons are behaving like radio buttons, not check boxes....
I assume this must be simple but I've dug and dug through documentation and the googl开发者_StackOverflow中文版e to no avail. Any ideas?
Thanks in advance --
This is standard behaviour. When you click the '-' button, a "Delete" button appears on the right of the row, which you press to delete the item. If it allowed multiple delete buttons visible at a time, the UI doesn't work - if you have one delete button on each row, clicking one of them and having all the selected rows disappear in inconsistent UI.
Even if you did force this behaviour, you wouldn't get into the App Store as you're redefining existing UI.
The only way to implement this properly is to have checkboxes and a delete button in a toolbar, like Mail, etc.
精彩评论