-3

in my app i'm am basically pushing a viewcontroller from another one [self.navigationController pushViewController:vc animated:YES];

The view controller that results from this call has a navigation bar but I can't name it through the story board. Basically, how do I set the navigation bar's text in code?

2 Answers2

0

add this line to viewDidLoad self.navigationItem.title = @"MyTitle";

0

If you are working in the storyboard then you can also set the title of the navigationBar just double clicking on the navigationBar. I will work fine for you. try that.

junaidsidhu
  • 3,539
  • 1
  • 27
  • 49