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];

 

posted on 2014-10-15 16:26  Hai_阔天空  阅读(520)  评论(0编辑  收藏  举报

导航