-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?

4

2 回答 2

0

如果您在情节提要中工作,那么您还可以设置导航栏的标题,只需双击导航栏即可。我会为你工作得很好。试试看。

于 2013-02-15T06:24:42.697 回答
0

将此行添加到 viewDidLoad self.navigationItem.title = @"MyTitle";

于 2013-02-15T05:31:02.843 回答