Image Renderer not Working

I am building an app that saves the view as an image. I am trying to use the ImageRenderer to do that. But when I type it in, it says it cannot find ImageRenderer in scope. How do I fix this to use ImageRenderer?

It's easier to answer your question if you share your code, then we know what you are asking about.

  • Also, what platform, iOS or Mac, or other?
  • Also also, what language, Objective-C or Swift, or other?

Perhaps you are using Swift on iOS, and you mean UIGraphicsImageRenderer?
If so, did you remember to import CoreGraphics?

I am on Mac IOS using swift

Image Renderer not Working
 
 
Q