标签:
UINavigationBar *navBar = self.navigationController.navigationBar;
[navBar setBarStyle:UIBarStyleDefault];
typedef NS_ENUM(NSInteger, UIBarStyle) {
UIBarStyleDefault = 0,
UIBarStyleBlack = 1,
UIBarStyleBlackOpaque = 1, // Deprecated. Use UIBarStyleBlack
UIBarStyleBlackTranslucent = 2, // Deprecated. Use UIBarStyleBlack and set the translucent property to YES
};
if ([navBar respondsToSelector:@selector(setBackgroundImage:forBarMetrics:)]){
// UIBarMetricsLandscapePhone
[navBar setBackgroundImage:[UIImage imageNamed:@"图片名称"]forBarMetrics:UIBarMetricsDefault];
}
UIBarMetricsLandscapePhone:用横着时UINavigationBar的标准尺寸来显示UINavigationBar
标签:
原文地址:http://www.cnblogs.com/qq449832375/p/4706313.html