Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在搜索问题的解决方案时,我发现NSFont和UIFont都有,
两者之间的基本区别是什么,我们应该何时使用?
NSFont其中一部分AppKit是 MacOS 的 UI 库。
NSFont
AppKit
UIFont其中一部分UIKit是 iOS 的 UI 库。
UIFont
UIKit
appkit uikit 的 Apple 文档
nsfont 的 Apple 文档
很明显,它们都是不同框架的一部分。
如果您使用的是 macOS,请使用NSFont
对于 iOS,您将使用UiFont
UiFont