开发者

How to do tabBar.title != navBar.title?

开发者 https://www.devze.com 2023-01-08 04:02 出处:网络
I have tab bar, and navigation 开发者_如何学JAVAbar in it. In navigation bar I have table view. The problem is, when I set the title to the tab bar in IB, and next set the title in table view, tab bar

I have tab bar, and navigation 开发者_如何学JAVAbar in it. In navigation bar I have table view. The problem is, when I set the title to the tab bar in IB, and next set the title in table view, tab bar title is changing to title from table view, and I have the same title in navigation bar and tab bar, but I want have different titles there.

How to set tab bar title to be different then in van bar?


Try this:

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

This link also has a similar but different solution: self.title sets navigationController and tabBarItem's title? Why?


self.navigationItem.title = "Your title"
0

精彩评论

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