首页 > 其他 > 详细

关于UITextAttributeTextColor,NSForegroundColorAttributeName的问题

时间:2016-07-30 00:20:54      阅读:219      评论:0      收藏:0      [点我收藏+]

UITextAttributeTextColor的问题

 

objc中使用UITextAttributeTextColor

    [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:navigationBarColor,UITextAttributeTextColor, nil] forState:UIControlStateSelected];

 

swift中使用NSForegroundColorAttributeName

   UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName:navigationBarColor], forState: UIControlState.Selected)

 

Wrong:’UITextAttributeTextColor‘ is unavailable: Use NSForegroundColorAttributeName            

UITabBarItem.appearance().setTitleTextAttributes([UITextAttributeTextColor:navigationBarColor], forState: UIControlState.Selected)

 

 

objc

NSDictionary dic = [NSDictionary dictionaryWithObjectsAndKeys:navigationBarColor,UITextAttributeTextColor, nil

equals

NSDictionary dic = [UITextAttributeTextColor:navigationBarColor

关于UITextAttributeTextColor,NSForegroundColorAttributeName的问题

原文:http://www.cnblogs.com/louisQian/p/5719906.html

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