zoukankan      html  css  js  c++  java
  • iOS 导航栏风格

    IOS-导航栏风格

    导航控制器可以用几种不同的风格来显示自身。默认风格就是标准的灰色外观。目前支持三种不同的风格。

    风    格

    描    述

    UIBarStyleDefault

    默认风格;灰色背景,白色文字

    UIBarStyleBlack

    纯黑色背景,白色文字

    UIBarStyleBlackOpaque

    纯黑色背景,白色文字        

    UIBarStyleBlackTranslucent

    透明黑色背景,白色文字

     

    风格是通过barStyle属性来设置的。这个属性属于导航控制器,而不是视图控制器,因此在各个视图之间来回切换时,此属性可以保持一致:

    self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; 

     

    IOS中原文档如下:

    UIBarStyle
    Defines the stylistic appearance of different types of views.

    typedef enum {
        UIBarStyleDefault          = 0,
        UIBarStyleBlack            = 1,
     
        UIBarStyleBlackOpaque      = 1, // Deprecated
        UIBarStyleBlackTranslucent = 2, // Deprecated
    } UIBarStyle;
    Constants
    UIBarStyleDefault
    Use the default style normally associated with the given view. For example, search bars and tool bars typically use a blue gradient background.
    Available in iOS 2.0 and later.
    Declared in UIInterface.h.


    UIBarStyleBlack
    Use an opaque black style.
    Available in iOS 3.0 and later.
    Declared in UIInterface.h.


    UIBarStyleBlackOpaque
    Deprecated. Use UIBarStyleBlack instead.
    Available in iOS 2.0 and later.
    Declared in UIInterface.h.


    UIBarStyleBlackTranslucent
    Deprecated. Use UIBarStyleBlack and set the translucent property to YES instead.
    Available in iOS 2.0 and later.
    Declared in UIInterface.h.

    导航控制器可以用几种不同的风格来显示自身。默认风格就是标准的灰色外观。目前支持三种不同的风格。

    风    格

    描    述

    UIBarStyleDefault

    默认风格;灰色背景,白色文字

    UIBarStyleBlack

    纯黑色背景,白色文字

    UIBarStyleBlackOpaque

    纯黑色背景,白色文字        

    UIBarStyleBlackTranslucent

    透明黑色背景,白色文字

     

    风格是通过barStyle属性来设置的。这个属性属于导航控制器,而不是视图控制器,因此在各个视图之间来回切换时,此属性可以保持一致:

    self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; 

     

    IOS中原文档如下:

    UIBarStyle
    Defines the stylistic appearance of different types of views.

    typedef enum {
        UIBarStyleDefault          = 0,
        UIBarStyleBlack            = 1,
     
        UIBarStyleBlackOpaque      = 1, // Deprecated
        UIBarStyleBlackTranslucent = 2, // Deprecated
    } UIBarStyle;
    Constants
    UIBarStyleDefault
    Use the default style normally associated with the given view. For example, search bars and tool bars typically use a blue gradient background.
    Available in iOS 2.0 and later.
    Declared in UIInterface.h.


    UIBarStyleBlack
    Use an opaque black style.
    Available in iOS 3.0 and later.
    Declared in UIInterface.h.


    UIBarStyleBlackOpaque
    Deprecated. Use UIBarStyleBlack instead.
    Available in iOS 2.0 and later.
    Declared in UIInterface.h.


    UIBarStyleBlackTranslucent
    Deprecated. Use UIBarStyleBlack and set the translucent property to YES instead.
    Available in iOS 2.0 and later.
    Declared in UIInterface.h.

  • 相关阅读:
    PhoenixFD插件流体模拟——UI布局【Dynamics】详解
    Altera三速以太网IP核使用(下篇)之千兆网接口设计与使用
    FPGA之千兆网接口设计与使用(不调用IP核,适用于Alter与Xilinx,简单粗暴实现udp协议封装)
    基于Matlab Hdl Coder实现FPGA程序开发(卡尔曼滤波算法实现)
    FPGA之SSI接口协议实现
    FPGA之BISS接口协议实现
    Xilinx DDR2 IP核使用
    FFT IP核调用与仿真之SCALE压缩因子设置
    Quartus/Modelsim调试仿真技巧
    FPGA之CORDIC算法实现_代码实现(下)
  • 原文地址:https://www.cnblogs.com/yulang314/p/3583389.html
Copyright © 2011-2022 走看看