首页 > 其他 > 详细

设置UITabBarController的背景颜色

时间:2015-01-15 12:46:17      阅读:378      评论:0      收藏:0      [点我收藏+]
 if (IOS7) {
        self.tabBarController.tabBar.barTintColor = kTAB_BAR_GB_COLOR;
    }else{
        self.tabBarController.tabBar.tintColor = kTAB_BAR_GB_COLOR;
        [[UITabBar appearance] setBackgroundImage:[ZQUtiles imageWithColor:kTAB_BAR_GB_COLOR size:CGSizeMake(29, 1)]];//设置背景,修改颜色是没有用的
        
        [[UITabBar appearance] setSelectionIndicatorImage:[ZQUtiles imageWithColor:kTAB_BAR_GB_COLOR size:CGSizeMake(29, 1)]];
        
        [[UITabBar appearance] setShadowImage:[ZQUtiles imageWithColor:kDEFAULT_BG_COLOR size:CGSizeMake(29, 1)]];//隐藏那条黑线
        
        [[UITabBarItem appearance] setTitlePositionAdjustment:UIOffsetMake(0, -2)];
    }

 

设置UITabBarController的背景颜色

原文:http://www.cnblogs.com/niit-soft-518/p/4225866.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!