zoukankan      html  css  js  c++  java
  • iOS navigationBar 的isTranslucent属性

    苹果文档:

    A Boolean value indicating whether the navigation bar is translucent (YES) or not (NO).

    The default value is YES. If the navigation bar has a custom background image, the default is YES if any pixel of the image has an alpha value of less than 1.0, and NO otherwise.
    If you set this property to YES on a navigation bar with an opaque custom background image, the navigation bar will apply a system opacity less than 1.0 to the image.

    If you set this property to NO on a navigation bar with a translucent custom background image, the navigation bar provides an opaque background for the image using black if the navigation bar has UIBarStyleBlack style, white if the navigation bar has UIBarStyleDefault, or the navigation bar’s barTintColor if a custom value is defined.

    解释:

    决定导航栏是否是半透明的;

    默认是YES,如果设置成YES ,放了一副不透明的图,那么效果是自动会把这个图弄成半透明;
    如果设置成NO,放了一副半透明的图,
    如果barstyle是UIBarStyleBlack,效果是半透明的图自动加上黑色背景
    如果barstyle是UIBarStyleDefault,效果是半透明的图自动加上白色背景
    如果设置了barTintColor,效果是半透明的图自动加上barTintColor的背景
    这个透明属性会影响到view的坐标,当为YES的时候,坐标是从(0,0)开始的,当为NO的时候,是从(0.64)开始的
  • 相关阅读:
    鼠标经过,显示悬浮DIV
    js 循环向上滚动
    Android 全局搜索条写成自定义控件-曹永思
    CYS-Sqlite数据导入工具
    启动Android App时,动态将Sqlite数据库文件导入到手机中类方法
    asp.net 多线程
    1.母版简单创建和使用
    class表与student表之间的关系
    02Del.ashx(删除班级)
    05StuList.aspx(学生列表)
  • 原文地址:https://www.cnblogs.com/losedMemory/p/6031680.html
Copyright © 2011-2022 走看看