zoukankan      html  css  js  c++  java
  • iOS7中都Bar的透明问题

    /*
     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

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

  • 相关阅读:
    30分钟掌握ES6/ES2015的核心内容(上)
    rem 响应式用法
    angular框架MVVM
    vue3 + vite + elmentui
    vue3 + vite + elmentui
    vue3 + vite 开发新项目
    滚动条滚动加一个进度条
    jquery 截取页面 url ,切换新的url 跳转
    h5,css3
    前端模板预编译技术
  • 原文地址:https://www.cnblogs.com/breezemist/p/3659829.html
Copyright © 2011-2022 走看看