开发者

How to change default tabbar item icon title?

I have created a tabbar based application.In one of my tabbar item i have used "Featured" default identifier in tabbar item. It assigned as cross light image with title "Featured".Now i want to change its title from "Featured " to "FAQ" (Only title need to be changed). Is this possible to change a default identifier tabbar item title ?

Can any one help me ? Thanks in advance....

If its not possible ? I have to download the "Featured" tabbar icon from internet and set image and title for that tabbar item.If me开发者_JAVA百科ans where can i download the tabbar item icons("Featured")? I tried but could not find an proper link plz guide me?


Are you trying to use the "Featured" icon with the "FAQ" title? If so, that goes in direct violation of the HIG and you may want to reconsider this.

Regardless, are you doing this in IB or in code? It's easy in IB—just select the tab you want to change, then in the Properties inspector (command-1 in Xcode 3, Command-Option 4 in Xcode 4), change the Title field to whatever you want. You can then also change the image from there as well.

In code, you're going to need access to the tab bar itself, whether as a subview of your current view, or as the tabBarController.tabBar property. Grab your instance, and use the setItems:animated: method to add a new set of items. The items are of the UITabBarItem class, and can be created with the initWithTitle:image:tag or initWithTabBarSystemItem:tag: methods. Check the docs for more info.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜