开发者

Navigation Controller Title

开发者 https://www.devze.com 2023-03-28 15:21 出处:网络
I have a navigation controller and i set the title in the vi开发者_StackOverflow社区ewDidLoad like so:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消