Question

I've created a master detail app using the template in Xcode. When I did the Apple ToDoList tutorial where you start with an ordinary app and add the second view yourself I added the plus and done buttons, but this template seems to include them automatically, except that I don't see them in interface builder, only when I run the app. I don't want to have an "edit" button on the top left (although I do want users to be able to swipe to delete items).

So, my question is twofold:

  1. Why does the Master Detail app template include edit and + buttons which don't show up in the storyboard (see screenshots) and
  2. How do I get rid of that Edit button (while leaving the swipe-to-delete functionality)?

http://www.mazz0.com/images/xcode/masterdetaileditbutton/storyboard.png http://www.mazz0.com/images/xcode/masterdetaileditbutton/app.png

Was it helpful?

Solution

You can remove it easily with:

self.navigationItem.rightBarButtonItem = nil;

OTHER TIPS

In your TableViewController you can comment out:

// Use the edit button item provided by the table view controller.
// navigationItem.leftBarButtonItem = editButtonItem()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top