首页 > 移动平台 > 详细

iOS7中都Bar的透明问题

时间:2014-04-12 10:18:01      阅读:784      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
/*
 New behavior on iOS 7.
 Default is YES.
 You may force an opaque background by setting the property to NO.
 If the navigation bar has a custom background image, the default is inferred 
 from the alpha values of the image—YES if it has any pixel with alpha < 1.0
 If you send setTranslucent:YES to a bar with an opaque custom background image
 it will apply a system opacity less than 1.0 to the image.
 If you send setTranslucent:NO to a bar with a translucent custom background image
 it will provide an opaque background for the image using the bar‘s barTintColor if defined, or black
 for UIBarStyleBlack or white for UIBarStyleDefault if barTintColor is nil.
 */
@property(nonatomic,assign,getter=isTranslucent) BOOL translucent NS_AVAILABLE_IOS(3_0); // Default is NO on iOS 6 and earlier. Always YES if barStyle is set to UIBarStyleBlackTranslucent
bubuko.com,布布扣

总的来说,就是ios7中的bar的透明效果是由translucent属性控制的,在ios7中,默认是透明的,可以改为不透明。ios6中好像是通过barStyle来更改bar的透明问题的,不知道用不透明的style和 translucent = Yes 会怎么样?ios7中这个barStyle还有什么用吗?待实验!

iOS7中都Bar的透明问题,布布扣,bubuko.com

iOS7中都Bar的透明问题

原文:http://www.cnblogs.com/breezemist/p/3659829.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!