设置tabbar的选中状态下标签文字的颜色

// 1.设置选中文字颜色

[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor colorWithRed:234/255.0 green:50/255.0 blue:64/255.0 alpha:1],NSForegroundColorAttributeName, nil] forState:UIControlStateSelected];

时间: 2024-08-29 05:57:03

设置tabbar的选中状态下标签文字的颜色的相关文章

CSS如何改变文字选中状态下的颜色

CSS如何改变文字选中状态下的颜色:建议:尽可能的手写代码,可以有效的提高学习效率和深度.在默认状态先一般选中的文本颜色是白字蓝底的,不过可以通过CSS进行设置.当然浏览器的支持度还是不够好,IE8和IE8以下的浏览器不支持,但是其他主流浏览器都支持此属性,不过随着浏览器的升级,这个也不会是问题.代码实例如下: <!DOCTYPE html> <html> <head> <meta charset=" utf-8"> <meta n

jQ无法设置checkbox变成选中状态

设置以后checkbox并没有变成选中状态,用chrome调试看了一下,checkbox中确实有checked属性,针对这个问题,大家可以参考下本文 代码如下: $("input").attr("checked","checked") 设置以后checkbox并没有变成选中状态,用chrome调试看了一下,checkbox中确实有checked属性,而且,值为checked,但是页面显示仍然为未选中状态 $("input").

ios开发设置button的选中状态图片

可以在故事版中设置好所需要的图片,然后现在h文件中声明按钮的属性和方法 - (IBAction)moodViewShow:(id)sender; @property (weak, nonatomic) IBOutlet UIButton *faceBtn; 并且与故事版完成连接,然后在按钮的方法里设置选中的状态 - (IBAction)moodViewShow:(id)sender { if ([self.faceBtn isSelected]) {//如果是选中状态就置为no, [self.f

设置菜单的选中状态

思路:将当前点中的菜单索引赋值给priceChecked,如果class为true,则设置为选中状态,默认选中ALL 原文地址:https://www.cnblogs.com/psxiao/p/11965297.html

iOS Button 设置AttributeString 在不同状态下自适应尺寸心得

描述下场景:button在不同的状态显示不同的title样式 比如normal 下 font是[UIFont systemFontOfSize:18.0f weight:UIFontWeightRegular] 颜色是  [UIColor blackColor] select 下 font 是[UIFont systemFontOfSize:18.0f weight:UIFontWeightMedium]颜色是  [UIColor grayColor] 一开始这样设置: NSAttributed

设置链接的不同状态下的颜色

a:link{color:red}/*未被访问的链接的颜色*/ a:visited{color:blue}/*已被访问之后的颜色*/ a:hover{color:green}/*鼠标悬浮在链接上的颜色*/ a:active{color:block}/*正在被点击的链接*/

设置radio的选中状态

$("#s7").click(function () { var a = document.getElementById("s7"); if (a.checked) { var b = document.getElementById("s9"); b.checked = true;} else { var b = document.getElementById("s10"); var b1 = document.getElem

设置tabbar上面文字的颜色

//设置tabbar 选中文字的颜色 [[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:10.0f], NSForegroundColorAttributeName : [UIColor colorWithRed:63/255.0 green:178/255.0 blue:227/255.0 a

ios UIButton设置高亮状态下的背景色

一,通过按钮的事件来设置背景色 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 - (void)viewDidLoad {     [super viewDidLoad];          UIButton *button1 = [[UIButton alloc] initWithFrame:CGRectMake(50, 200, 100, 50)];     [button1 setTitle:@"button1"