开发者

Selecting one UITableView deletion control ("-" button) deselects others. How can I select more than one?

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜