我需要在Swift 3.0中实现这段Objective-C代码(我正在使用Xcode 8 Beta 3):
// Note: this code comes from an Obj-C category on UIImage
CGImageRef imageRef = CGImageCreateWithImageInRect(self.CGImage, cropRect);
UIImage *image = [UIImage imageWithCGImage:imageRef scale:self.scale orientation:self.imageOrientation];
我在最新的文档中找不到任何有关CGImageCreateWithImageInRect()
的内容。