質問

I have CoreGraphics, QuartzCore and AssetsLibrary frameworks imported. Why would I be getting an undeclared identifier error for CGImageDestinationRef?

Here is how I am declaring it:

 CGImageDestinationRef imageDestinationRef = CGImageDestinationCreateWithURL((__bridge CFURLRef)directoryURL, kUTTypeJPEG, 1, NULL);
役に立ちましたか?

解決

Because its defined in the ImageIO framework. Link and import it and you'll be fine.

Also the kUTTTypeJPEG constant is defined in the MobileCoreServices framework, so you will need that too.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top