开发者

Delete section (red delete button), UITableViewController - iOS

I'm trying to do a grouped uitableview and I have activated the edit option. I want the user to be able to delete the whole section too, not only specific rows.

So, when you click EDIT, the red minus button that shows on the left of each table cell, should show up for sections (left of the section title) too.

Anyone knows a way to do this?

Thanks in advance to everyone!

Ols开发者_运维技巧i.


There's no way to do it out of the box. You'll need to get fancy and return a custom view in your table view delegate's tableView:viewForHeaderInSection: method. When you enter edit mode, you'll have to add a delete button to those views.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜