首页 > 其他 > 详细

uitabbar 标题设置 button text attributes only respected for UIControlStateNormal

时间:2014-04-02 10:24:34      阅读:2833      评论:0      收藏:0      [点我收藏+]

uitabbar 标题设置 button text attributes only respected for UIControlStateNormal

    [[UITabBarItem appearance] setTitleTextAttributes:@{ UITextAttributeTextColor : [UIColor whiteColor] }
                                             forState:UIControlStateSelected];

设置 tabbar 标题时,出现提示

1
button text attributes only respected for UIControlStateNormal, UIControlStateHighlighted and UIControlStateDisabled. state = 1 is interpreted as UIControlStateHighlighted

 

解决方式:

  把上面 的  

"UIControlStateHighlighted" 换成 "UIControlStateSelected". 即可

 

http://stackoverflow.com/questions/10971705/uitabbaritem-appearance-settitletextattributes-keeps-logging-state-1-is-inte

http://stackoverflow.com/questions/3051958/changing-text-color-of-uitabbaritem

 

uitabbar 标题设置 button text attributes only respected for UIControlStateNormal,布布扣,bubuko.com

uitabbar 标题设置 button text attributes only respected for UIControlStateNormal

原文:http://www.cnblogs.com/cocoajin/p/3638245.html

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