【问题标题】:What is the difference between NSFont and UIFontNSFont 和 UIFont 有什么区别
【发布时间】:2017-09-07 08:54:57
【问题描述】:

在搜索问题的解决方案时,我发现 NSFontUIFont 都有,

两者的基本区别是什么?我们应该什么时候使用?

【问题讨论】:

  • UIFont:UIKit (iOS)、NSFont (AppKit):适用于 macOS。

标签: ios uifont nsfont


【解决方案1】:

NSFontAppKit 的一部分,它是 MacOS 的 UI 库。

UIFontUIKit 的一部分,UIKit 是 iOS 的 UI 库。

【讨论】:

    【解决方案2】:

    Apple documentation for appkit uikit

    Apple documentation for nsfont

    很明显,它们都是不同框架的一部分。

    【讨论】:

      【解决方案3】:

      如果您使用的是 macOS,请使用 NSFont

      对于 iOS,您将使用 UiFont

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-10-02
        • 2011-12-12
        • 2010-09-16
        • 2012-03-14
        • 2012-02-06
        • 2011-02-25
        • 2011-11-22
        • 2015-03-26
        相关资源
        最近更新 更多