I use storyboard.
I had a UINavigationContrller as a Initial View Controller. it had a rootViewController relationship with a UIViewController.
The UiViewController has a push segues to a TabBarController.
The first relashionship of the TabBarController is to a TableViewController.
i want to add an edit button to the TableViewController.
I tried to use this code: self.navigationItem.rightBarButtonItem = self.editButtonItem;
But this row is just ignored, and the navigation bar don’t show the button.
I write this code too: self.navigationController.navigationBarHidden = NO;
self.navigationcontroller.navigationItem.hidesBackButton = YES;
The first is not ignored (the navigation bar was hidden from the first UIViewController) the second is ignored and the backbutton remain.
Try adding this to your view controller: