When we are scrolling(slide to the left) UITableViewCell
,it displays a delete button,but I want to add other button on it,how should I do?
The style I want is like the system mail app in iOS 7, there is two buttons in UITableviewCell,one is delete button, another is more button.
Please suggest any ideas
Thanks
A possibility, follow these steps:
1) Delegate function
canEditRowAtIndexPath
should returnNO
;2) Load Custom cells in UITableView using
cellForRowAtIndexPath
.3) In custom cells, display two or more button and handle there visibility using:
Hope it can give you an idea, how to start.
As described at here you can achieve the same layout for cells as in Mail.app using additional UITableView datasource/delegate methods
This is really easy, don't reinvent the wheel use this control (custom UITableViewCell) it's open source and works really well.
If you don't just want to drop it in and use it, well at least you can read exactly how they've done it! https://www.cocoacontrols.com/controls/swtableviewcell
you can create more button use this example approach
https://github.com/scheinem/MSCMoreOptionTableViewCell
this link example is helpful more and you can create customize more button.
https://github.com/CEWendel/SWTableViewCell
Apple has added their own support for this