首页 > 代码库 > NavigationBar 背景颜色,字体颜色

NavigationBar 背景颜色,字体颜色

// 设置状态栏颜色    [application setStatusBarStyle:UIStatusBarStyleLightContent];        // 设置导航栏    [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];        if (kIS_IOS7) {        [[UINavigationBar appearance] setBarTintColor:KNavibarColor];    } else {        [[UINavigationBar appearance] setBackgroundImage:[UIImage Color:KNavibarColor Size:CGSizeMake(0.5, 44)]                                           forBarMetrics:UIBarMetricsDefault];    }        NSDictionary *textTitleOptions = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], UITextAttributeTextColor, [UIColor whiteColor], UITextAttributeTextShadowColor, nil];    [[UINavigationBar appearance] setTitleTextAttributes:textTitleOptions];

 

NavigationBar 背景颜色,字体颜色