I’m confusing.
All I want to do is setting title “one” to the viewcontroller
and title “two” to the tab bar item that show it.
What happen now is :
I set “one” to the tabbaritem in Interface builder.
When I set in the viewDidLoad self.title=”two”, the tab bar item text is changed also to “two”
How can I prevent that ?
Thanks.
In a normal UIViewController,
self.titlerefers to the same object asself.tabBarItem.title. You can’t change them independently.If you want to display a title somewhere other than in the UITabBarItem, you could add a UILabel to the view and set its text.