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

luckylefty01

macrumors member
Original poster
Apr 8, 2008
32
0
I'd really like to figure out how to get a mail style* delete button to show up in my app when I set my table view to editing. Is there any way to do this? I'm not having any luck finding any info on it.

My eventual goal would be to replace the "delete" text with different text for a similar action, but I really need the button with the text as opposed to the little delete sign.

*as in you swipe and a little red box pops up on the right with the text "Delete" on it.
 

admanimal

macrumors 68040
Apr 22, 2005
3,531
2
*as in you swipe and a little red box pops up on the right with the text "Delete" on it.

This is the default behavior for table rows. As far as I know, I didn't do anything special to my table to enable it, but this is exactly what it does and I didn't have to implement it myself.
 

robfarmer

macrumors newbie
Jul 26, 2008
20
0
Code

Try adding this code into your UITableViewController class:

- (void)viewDidLoad {
self.navigationItem.rightBarButtonItem = self.editButtonItem;

...
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.