我导入了 CoreGraphics、QuartzCore 和 AssetsLibrary 框架。为什么我会收到 CGImageDestinationRef 的未声明标识符错误?
这是我声明它的方式:
CGImageDestinationRef imageDestinationRef = CGImageDestinationCreateWithURL((__bridge CFURLRef)directoryURL, kUTTypeJPEG, 1, NULL);
我导入了 CoreGraphics、QuartzCore 和 AssetsLibrary 框架。为什么我会收到 CGImageDestinationRef 的未声明标识符错误?
这是我声明它的方式:
CGImageDestinationRef imageDestinationRef = CGImageDestinationCreateWithURL((__bridge CFURLRef)directoryURL, kUTTypeJPEG, 1, NULL);
因为它在ImageIO框架中定义。链接并导入它,你会没事的。
kUTTTypeJPEG常量也是在框架中定义的MobileCoreServices,所以你也需要它。