I have one navigation controller in my entire project. When I use a show segue to move to the next controller, the back button that is supposed to be in the title bar simply does not show up. I know that users have experienced this problem, but so far, no solution has worked.
Asked
Active
Viewed 528 times
-1
-
The "back" arrow should show automatically. There is not enough info here to help you though. Can you show your storyboard (and the segue types) or create a minimal example that shows the problem? – Robotic Cat Apr 12 '16 at 17:36
-
Are you presenting the controller modally? – Chris Droukas Apr 12 '16 at 20:24
-
No. I'm using a normal show segue. There really isn't much to show that would help. Just a standard navigation controller and a root view controller. – Nate Folger Apr 13 '16 at 00:39
1 Answers
0
For each view controller you have to set the back bar button as like follow,
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back.png"] style:UIBarButtonItemStylePlain target:self action:@selector(backAction:)];
[self.navigationItem setBackBarButtonItem:backButton];
In swift,
let backButton = UIBarButtonItem(image: UIImage(named: "back.png"), style: UIBarButtonItemStyle.Plain, target: self, action: "backAction:")
self.navigationItem.backBarButtonItem = backButton

Tyson Vignesh
- 315
- 2
- 14