我中的UITabBar一样在我的三个选项卡栏项的应用程序。

在某些情况下,我想告诉所有三个标签栏项目,某些情况下,我想藏起的TabBar的第三个标签栏项目。

请帮我

有帮助吗?

解决方案

发送的 setItems:动画:消息给UITabBar。例如:

// 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];
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top