码迷,mamicode.com
首页 > 其他好文 > 详细

关于UITextAttributeTextColor,NSForegroundColorAttributeName的问题

时间:2016-07-30 00:23:24      阅读:438      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!