2

I have got a Tab Bar Controller inside a Navigation Controller but I cant seem to set the Navigation bar title or add a button to the navigation bar using:

self.title = @"My Name";

The code above only changes the Tab Bar Item name and not the navigation controller.

Secondly. I want to disable going back the login screen (The screen with the UIWebview over it in the screenshot)

EDIT: I found a possible duplicate

Overview Storyboard

Andrew Ho
  • 618
  • 9
  • 21

2 Answers2

3

It's uncommon to put a tabBarController into a navigationController. If you can't find what's going wrong in your way try to use another way to approach what you want which is put navigationControllers into one tabBarController. Make tabBarController the initial view controller. sample

dopcn
  • 4,218
  • 3
  • 23
  • 32
0

Not sure about the others but to set the title on the nav bar try this:

self.navigationController.navigationBar.topItem.title = @"My Title";

Although with the button in the nav bar just drag in a UIBarButtonItem from the side panel

pidge
  • 20
  • 3
  • Where are you setting it? "View did Load" – pidge Sep 11 '14 at 14:09
  • Yes, I found the correct code: [self.parentViewController.navigationItem setTitle:@"Title"]; Only problem now is that the Tab Bar goes a way in each detail view of the table in the first tab – Andrew Ho Sep 11 '14 at 14:09