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