How to change tabBarItem name?
I'm working with tabBar Based Application..tabBar having four tabBarItem named as,1.Home,2.Pictures,3.My_Pictures,4.Help...
In 2nd view(Pictures)having 3 buttons...At the time click on the first button it goes to a new view(SimpleView)this view having 4 buttons...at this time tabbarItem name changed 开发者_JAVA技巧to Colors from pictures,i have done this by giving like this,
self.title=@"Colors"; in the button action event...Then i want to change the tabBarItem title to Pictures from colors when the button is clicked from among the 4 buttons in simpleView...I have write the same code self.title=@"Pictures" in the button action event...At this time the tabBarItem name doesn't change....what should i do for this... please give me some ideas to do this...
Thank you for your effort in Advance... Renuga
TabBarController has one feature that, when you change any navigation viewcontroller title, then that title will be reflected to tabBar item.
But you should remember one thing, i.e.,
you can change the tabBarItem name by the main viewcontroller, that is refered to the specific tabBar, but not the sub ViewController.
Ex: For Pictures tab, you have given pictureViewContoroller, you can change the tabBar item name, by using that object only. you can't change by remaining view controllers or objects.
Regards,
Satya.
精彩评论