码迷,mamicode.com
首页 > 移动开发 > 详细

iOS中修改头部tabBarButton 默认按钮的颜色和默认字体颜色

时间:2015-10-22 23:48:47      阅读:293      评论:0      收藏:0      [点我收藏+]

标签:

+(void)initialize

{

    //初始化设置主题

    UINavigationBar *navBar = [UINavigationBar appearance];

    [navBar setBackgroundImage:[UIImage imageNamed:@"NavBar64"] forBarMetrics:UIBarMetricsDefault];

    //设置文字颜色

    NSMutableDictionary *dict = [NSMutableDictionary dictionary];

    navBar.tintColor = [UIColor whiteColor];

    

    dict[NSForegroundColorAttributeName] = [UIColor whiteColor];

    dict[NSFontAttributeName] = [UIFont systemFontOfSize:18];

    [navBar setTitleTextAttributes:dict];

    

    UIBarButtonItem *barButton = [UIBarButtonItem appearance];

    [barButton setTitleTextAttributes:dict forState:UIControlStateNormal];

    

}

 

iOS中修改头部tabBarButton 默认按钮的颜色和默认字体颜色

标签:

原文地址:http://www.cnblogs.com/nianzhilian/p/4903147.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!