首页 > 其他 > 详细

iOS 导航栏风格

时间:2014-03-06 01:49:05      阅读:542      评论:0      收藏:0      [点我收藏+]

IOS-导航栏风格

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

风    格

描    述

UIBarStyleDefault

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

UIBarStyleBlack

纯黑色背景,白色文字

UIBarStyleBlackOpaque

纯黑色背景,白色文字        

UIBarStyleBlackTranslucent

透明黑色背景,白色文字

 bubuko.com,布布扣

风格是通过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

透明黑色背景,白色文字

 bubuko.com,布布扣

风格是通过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.

iOS 导航栏风格,布布扣,bubuko.com

iOS 导航栏风格

原文:http://www.cnblogs.com/yulang314/p/3583389.html

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