首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >iPhone + UITabBar

iPhone + UITabBar
EN

Stack Overflow用户
提问于 2009-11-04 15:11:52
回答 1查看 1.8K关注 0票数 0

我的应用程序中有一个带有三个选项卡栏项目的UITabBar。

在某些情况下,我想要显示所有三个选项卡栏项目,而在某些情况下,我想从选项卡栏中隐藏第三个选项卡栏项目。

请帮帮我

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2009-11-04 15:27:49

向UITabBar发送setItems:animated:消息。例如:

代码语言:javascript
复制
// 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];
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1672134

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档