【问题标题】:importing UIKit or CoreGraphics?导入 UIKit 或 CoreGraphics?
【发布时间】:2015-06-28 12:53:06
【问题描述】:

我有一个简单的文件,我想在此处保持低调。如果我能降低构建时间,我会的。在 UIKit 和 CoreGraphics 之间,哪个更小/更紧凑,更适合我的情况?

import CoreGraphics // can be replaced with import UIKit

let π = CGFloat(M_PI)
let twoπ = 2 * π

【问题讨论】:

    标签: ios optimization uikit core-graphics


    【解决方案1】:

    CoreGraphics 是更紧凑的一种。 UIKit 本身依赖于 CoreGraphics。你不需要导入 UIKit,除非你需要使用其中定义的东西。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-10-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多