设置tabBar的背景图片,选中文字颜色
2017-02-25 18:34
561 查看
// 被废弃了 会有警告 self.tabBar.selectedImageTintColor = [UIColororangeColor]; // 最新的使用方法 NSMutableDictionary *textAttrs = [NSMutableDictionarydictionary]; textAttrs[NSForegroundColorAttributeName] =HWColor(123,123, 123); NSMutableDictionary *selectTextAttrs = [NSMutableDictionary dictionary]; selectTextAttrs[NSForegroundColorAttributeName] = [UIColor orangeColor]; [childVc.tabBarItem setTitleTextAttributes:textAttrs forState:UIControlStateNormal]; [childVc.tabBarItemsetTitleTextAttributes:selectTextAttrs forState:UIControlStateSelected]; // - 设置选中的图片 图片不被渲染 childVc.tabBarItem.selectedImage = [[UIImageimageNamed:selectedImage] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
相关文章推荐
- 设置 TabBarItem 选中时的图片及文字颜色
- TabBar 的selecedImage无法显示设置图片问题 和item文字颜色选中设置
- iOS TabbarController 设置底部Toolbar图片和文字颜色选中样式
- iOS 设置UITabBar,背景颜色,默认图片,文字颜色,和选中颜色.
- 设置tablayout选中文字颜色和背景图片
- IOS UITabBar+UINavigation(改变背景/标题文字颜色、状态图片、tabbar选中方形背景、item间距)
- ios中UITableViewCell选中后的颜色设置和背景图片
- IOS设置导航栏全局的背景图片、导航栏title文字颜色大小、导航栏左右按钮的颜色。
- 转 Android RadioButton设置选中时文字和背景颜色同时改变
- actionbar设置背景图片和文字颜色
- UITabBarController设置选中时图片和文字的颜色
- storyboard创建的:设置tabbar的item选中状态的颜色和图片
- 设置TabBarItem选中时的图片及文字颜色
- 计算背景图片的灰度值,设置文字的颜色
- 【iOS开发】设置TabBarItem上文字跟图片一样的颜色
- wpf 设置treeView节点选中后的的文字颜色、节点的背景色以及节点失去焦点后的背景颜色
- swift-UITabBarController 设置选中和未选中状态文字图片颜色或使用原图
- Android RadioButton设置选中时文字和背景颜色同时改变
- tabbar 设置选中文字的颜色
- UITabBarController设置选中时图片和文字的颜色