标签:
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