在iOS中经常碰到二者转换的情况,有啥区别呢,见《iPhone Programming》Chapter 18:
UIKit (where we get UIImage and anything else prefixed with UI) only exists on the iPhone. Core Animation, however, exists on the iPhone and on the Mac.
This means using the Core Graphics types makes your code portable between systems. Fortunately, UIKit objects have methods to easily switch between themselves and their Core Graphics counterparts (for example, UIImage’s CGImage and initWithCGImage: methods).