Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 * π
like image 521
Steven Williamson Avatar asked Oct 22 '25 11:10

Steven Williamson


1 Answers

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.

like image 74
Cihan Tek Avatar answered Oct 25 '25 02:10

Cihan Tek