Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pinsrw

macrumors regular
Original poster
May 30, 2010
194
0
Hi all,

I've noticed that some apps from Apple have this great feature, whereby in a table the user drags right, then a red Delete button appears that they can use or not.

Is that a standard part of the iOS GUI, or something custom that's only used in-house by Apple?

Thanks.
 

KoolStar

macrumors demi-god
Oct 16, 2006
825
9
Kentucky
You need to implement the following methods.
Code:
– tableView:willBeginEditingRowAtIndexPath:
– tableView:didEndEditingRowAtIndexPath:
– tableView:editingStyleForRowAtIndexPath:
 

cnstoll

macrumors 6502
Aug 29, 2010
254
0
Don't forget "commitEditingStyle" if you want those changes to be reflected in your data source.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.