Been trying to hide the "back" button on my nav bar. The nav bar is on a tab bar controller and when it first loads, the back button is hidden. But when returning from the child nav controller, the back button appears again with the child view controllers title. I've tried self.navigationBar.navigationItem.hidesBackButton = YES; on my tab bar/nav bar controller in viewDidLoad: and viewWillAppear: methods, and also on my child view controller in my custom button segue method. I also tried setting the buttons title to nil using self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStyleBordered target:nil action:nil]; but that is returning a symbol for the back button instead of "back". And I don't want either. I've checked other threads on here and tried all the solutions I could find. Not having any luck.. any other ideas? Cheers!
1
votes
How did you put a nav bar on a at bar controller?
- Abizern
1 Answers
0
votes
Okay, think I found something that works. I'm not sure if it is the best solution but it's simple and it seems to be working. What I did was, I added my own barButton item in place of the Back button and set the tint to Clear color, then I disabled it from the attributes inspector. So what I am left with is an inactive button with a clear title. let me know if anyone has same problem or if there's a better solution!