I have a navigation controller and i set the title in the vi开发者_StackOverflow社区ewDidLoad like so:
self.title = @"My View Controller";
But a name like that is too long to fit in the tab bar name down below. How do i change the tab bar name without changing the title displayed on the navigation bar?
If I am correct, you can set them separately. If you are adding view controllers to the tab bar, you can do something like:
thisViewController.title = @"Name of this view controller";
(or self.title in your case)
and then for the title at the top, after have self.navigationItem.title = @"Title at top";
?
You should set the tabBarItem property of the tabBarController of your tab bar. That's the correct way to go.
精彩评论