mazz0 mazz0 - 1 year ago 141
Objective-C Question

UITableView - how do I hide the edit button?

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

Answer Source

You can remove it easily with:

self.navigationItem.rightBarButtonItem = nil;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download