首先
- CALyer 是定義在 QuartzCore 框架中的。
- CGImageRef、CGColorRef 兩種數據類型是定義在 CoreGraphics 框架中的。
- UIColor、UIImage 是定義在UIKit 框架中的 。
其次
- QuartzCore 框架和 Coregraphics 框架是可以跨平臺使用的,在 IOS 和 Mac OS 上都能用。
- UIKit只能用在 IOS中。
- 爲了保證可移植性,QuartzCore 不能使用 UIImage、 UIColor ,只能使用 CGImageRef、CGColorRef。