zoukankan      html  css  js  c++  java
  • 【IOS】修改TabBar属性

     1  if (IOS7) {
     2 
     3 
     4         //ios7下,tabbar选中的文字颜色
     5 
     6         _tabBarController.tabBar.tintColor = COLOR(245, 254, 0, 1);
     7 
     8     }
     9 
    10     else {
    11 
    12         //ios6下,tabbar选中的文字颜色
    13 
    14         [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
    15 
    16                                                            COLOR(245, 254, 0, 1), UITextAttributeTextColor,nil]
    17 
    18                                                  forState:UIControlStateHighlighted];
    19 
    20     }
    21     //修改tabbar背景图
    22   _tabBarController.tabBar.backgroundImage = LOADPNGIMAGE(@"TabbarBG");
    23 
    24 
    25 //修改选中和未选中的图片
    26  [viewController.tabBarItem setFinishedSelectedImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@按下.png",imageArr[i]]] withFinishedUnselectedImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@弹起.png",imageArr[i]]]];
  • 相关阅读:
    图片懒加载
    浅谈javascript的函数节流
    js字符串常用方法详解
    js数组详解
    thinkphp3.2 批量添加数据
    openssl证书及配置
    手机访问PC端
    mui框架(三)
    mui框架(二)
    mui框架(一)
  • 原文地址:https://www.cnblogs.com/DannyApple/p/3971926.html
Copyright © 2011-2022 走看看