iPhone - 制作标签栏透明 [英] iPhone - Making a Tab Bar Transparent

查看:140
本文介绍了iPhone - 制作标签栏透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案

由于 UITabBar

code>是 UIView 的子类,您是否尝试调整其 alpha 属性?



请注意,如果您尝试修改与 UITabBarController 相关联的标签栏,则应考虑Apple发出的此警告, a href =http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITabBar_Class/Reference/Reference.html =nofollow noreferrer> UITabBar的参考资料


重要提示:在iOS 3.0及更高版本
不应尝试使用方法
和此类的属性来修改
当它与
a选项卡栏控制器对象关联时的选项卡栏。以这种方式修改
的标签栏会导致
抛出异常。相反,对标签栏或其
项的任何
修改都应通过标签栏
控制器接口进行。您仍然可以
直接修改选项卡栏对象
不与选项卡栏
控制器相关联。



How do I make a tab bar transparent in cocoa touch?

解决方案

Since UITabBar is a subclass of UIView, have you tried adjusting its alpha property?

Note that if you are trying to modify a tab bar associated with a UITabBarController, you should consider this warning from Apple, located in the reference for UITabBar:

Important: In iOS 3.0 and later, you should not attempt to use the methods and properties of this class to modify the tab bar when it is associated with a tab bar controller object. Modifying the tab bar in this way results in the throwing of an exception. Instead, any modifications to the tab bar or its items should occur through the tab bar controller interface. You may still directly modify a tab bar object that is not associated with a tab bar controller.

这篇关于iPhone - 制作标签栏透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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