iPhone app editing mode

Discussion in 'iOS Programming' started by cordoprod, Nov 21, 2009.

  1. cordoprod macrumors newbie

    Nov 16, 2009
    I need some help with my application.
    First I have a TableView which pushed on another View. In the second View I have another TableView and here i have to be able to insert rows.

    What I want to to is to replace the back button with an add button when editing mode is on.

    How do I do that?

    I've tried this in viewDidLoad:
    if (self.tableView.editing) {
    		UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd 
    		self.navigationItem.leftBarButtonItem = addButton;
    		[addButton release];

Share This Page