开发者

iPhone + UITabBar

I have a UITabBar in my application with t开发者_运维百科hree tab bar items.

At certain cases I want to show all three tab bar items and some cases I want to hide the 3rd tab bar item from the Tabbar.

Please help me


Send the setItems:animated: message to the UITabBar. For example:

// get array of current UITabBarItem objects
NSMutableArray *tabBarItems = [tabBarViewController.items mutableCopy];

// modify the array (remove or add UITarBarItem objects as appropriate) here

// animate the changes to the UITabBar
[tabBarViewController.tabBar setItems:tabBarItems animiated:YES];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜