Steven Williamson
Steven Williamson

Reputation: 187

importing UIKit or CoreGraphics?

I've got a simple file that I want to keep low profile here. If I can lower build times I will. Between UIKit and CoreGraphics, which is smaller / more compact and practical for my situation?

import CoreGraphics // can be replaced with import UIKit

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

Upvotes: 4

Views: 2988

Answers (1)

Cihan Tek
Cihan Tek

Reputation: 5409

CoreGraphics is the more compact one. UIKit itself relies on CoreGraphics. You don't need to import UIKit unless you need to use something defined in it.

Upvotes: 4

Related Questions