Mail style delete button on table view

Discussion in 'iOS Programming' started by luckylefty01, Jul 24, 2008.

  1. luckylefty01 macrumors member

    Apr 8, 2008
    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.
  2. admanimal macrumors 68040

    Apr 22, 2005
    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.
  3. robfarmer macrumors newbie

    Jul 26, 2008

    Try adding this code into your UITableViewController class:

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


Share This Page