zoukankan      html  css  js  c++  java
  • 系统UITabBar属性设置

    设置背景: 

    1. [_tabBar setBackgroundImage:[UIImage imageNamed:@"bg_tabbar"]];  

    设置某个Item选中的效果: 

    1. _tabBar.selectionIndicatorImage = [UIImage imageNamed:@"bar_item_selected"];//设置选中效果图片  

    设置UITabBarItem文字颜色 

    1. [[UITabBarItem appearance] setTitleTextAttributes:@{ UITextAttributeTextColor : [UIColor whiteColor] }  
    2.                                              forState:UIControlStateNormal];  
    3.     [[UITabBarItem appearance] setTitleTextAttributes:@{ UITextAttributeTextColor : [UIColor whiteColor] }  
    4.                                              forState:UIControlStateHighlighted];  

    设置UITabBarItem未选中与选中时的图片: 

      1. [_hotTabItem setFinishedSelectedImage:[UIImage imageNamed:@"1_selected"] withFinishedUnselectedImage:[UIImage imageNamed:@"1"]];  
      2.     [_searchTabItem setFinishedSelectedImage:[UIImage imageNamed:@"2_selected"] withFinishedUnselectedImage:[UIImage imageNamed:@"2"]];  
      3.     [_userTabItem setFinishedSelectedImage:[UIImage imageNamed:@"3_selected"] withFinishedUnselectedImage:[UIImage imageNamed:@"3"]];  
  • 相关阅读:
    swagger生成接口文档
    二分查找通用模板
    go-json技巧
    【Go】获取用户真实的ip地址
    数据库储存时间类型
    密码加密:md5/sha1 +盐值
    参数里时间格式的转换
    不好定位的元素定位
    vim编辑器
    ps -ef | grep php kill -9
  • 原文地址:https://www.cnblogs.com/weiboyuan/p/3387846.html
Copyright © 2011-2022 走看看