导入UIKit或CoreGraphics?

时间:2015-06-28 12:53:07

标签: ios optimization uikit core-graphics

我有一个简单的文件,我想在这里保持低调。如果我可以降低构建时间,我会。在UIKit和CoreGraphics之间,它对我的​​情况更小/更紧凑和实用?

import CoreGraphics // can be replaced with import UIKit

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

1 个答案:

答案 0 :(得分:4)

CoreGraphics更紧凑。 UIKit本身依赖于CoreGraphics。除非您需要使用其中定义的内容,否则您不需要导入UIKit。

相关问题