本文介绍了iOS使用NSColor与UIColor?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
UIColor
和 NSColor
之间的区别是什么?何时使用每个?我在尝试找出 UIColor
用于iOS中的属性字符串时遇到了 NSColor
。我理解为UIKit等使用 UIColor
,但我认为 NSColor
对此非常有用之类的事情。关于iOS编程, NSColor
是否已被废弃?
What's the difference between UIColor
and NSColor
, and when would one use each? I came across NSColor
while trying to figure out UIColor
uses for attributed strings in iOS. I understand the use of UIColor
for the UIKit and such, but I don't think NSColor
is really useful for this kind of thing. Has NSColor
fallen into disuse with regards to iOS programming?
推荐答案
在iOS中没有NSColor这样的东西。 UIColor是您应该使用的。
There is no such thing as NSColor in iOS. UIColor is what you should use.
NSColor仅作为OSX类存在。
NSColor only exists as a OSX class.
这篇关于iOS使用NSColor与UIColor?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!