My environment is as follows:
Xcode 12, macOS BS developing a macOS app.
I have an IBOutlet from a IB window as
@IBOutlet weak var imageView: NSImageView!
So, I want to store imageView to a NSData object and then save the NSData object in my UserDefaults.
Once I saved the Image in my UserDefaults I need to be able to decode or retrieve the image for use in other parts of the app.
How is this done?
Also, I have seen some cautions about converting an Image to NSData object and retrieving. It seems the retrieved image may not be 100% as it was originally. Is this true and if so why?
Thanks