Drawer是展现信息的一种有效方式,然而不同的view需要设置不同的UINavigationController的背景,具体设置方式:
[[nav navigationBar] setBarTintColor:[UIColor colorWithRed:0.019 green:0.705 blue:0.90 alpha:1.0]];
UINavigationController如果想简单设置,可以使用(https://github.com/aelx311/iOS-Practice/tree/master/BlueJay/BlueJay)中的BLUAppearanceManager,快速设置
#import "BLUAppearanceManager.h"
@implementation BLUAppearanceManager
+ (void)setNavigationBarAppearance
{
[[UINavigationBar appearance]setBarTintColor:kNAVIGATION_BAR_TINT_COLOR];
[[UINavigationBar appearance]setTitleTextAttributes:kNAVIGATION_BAR_TITLE_TEXT_ATTRIBUTES];
}
@end
网友评论