如何隐藏标签栏项目? [英] How can I hide a tab Bar Item?

查看:68
本文介绍了如何隐藏标签栏项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iPhone应用程序中添加了一个标签栏(UITabBar). 我想通过代码隐藏标签栏项目吗?有可能吗?

I have added a tab bar (UITabBar) in my iPhone application. I want to hide a tab Bar item through code? Is it possible?

推荐答案

在.h文件中声明

 UIBarButtonItem *mybutton

@property (nonatomic, retain) IBOutlet UIBarButtonItem *mybutton;

将其附加到IB中的UiBarButton

attache it to your UiBarButton in IB

然后在.m文件中执行

  @synthesize mybutton;

  mybutton.hidden=YES;

这篇关于如何隐藏标签栏项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆