Hello,
I need to create an NSImage
from a url and then set it to an image view in my application. I tried some code I found online but it didn't work. If anyone knows how to do this any help would be great.
Thanks
Hello,
I need to create an NSImage
from a url and then set it to an image view in my application. I tried some code I found online but it didn't work. If anyone knows how to do this any help would be great.
Thanks
You'll want to look at
initWithContentsOfURL:
Initializes and returns an NSImage instance with the contents of the specified URL.
- (id)initWithContentsOfURL:(NSURL *)aURL
Parameters
aUrl
The URL identifying the image.
Return Value
An initialized NSImage instance, or nil if the method cannot create an image representation from the contents of the specified URL.