NavigationController title颜色修改

    //设置返回按钮的颜色。
    self.navigationBar.tintColor = [UIColor whiteColor];
    //设置title属性
    UINavigationBar *appearance=[UINavigationBar appearance];
    NSMutableDictionary *textAttrs = [NSMutableDictionary dictionary];
    textAttrs[UITextAttributeTextColor] = [UIColor whiteColor];
    textAttrs[UITextAttributeFont] = [UIFont boldSystemFontOfSize:18];
    textAttrs[UITextAttributeTextShadowOffset] = [NSValue valueWithUIOffset:UIOffsetZero];
    [appearance setTitleTextAttributes:textAttrs];

 

 
posted @ 2015-02-13 15:48  NSFuck  阅读(394)  评论(0编辑  收藏  举报