Hi i am trying to load image which is located at desktop .
NSURL *imageURL = [[NSWorkspace sharedWorkspace] desktopImageURLForScreen:[NSScreen mainScreen]];
NSLog(@"%@",imageURL);
NSImage *testImage = [[NSImage alloc] initWithContentsOfURL:imageURL];
NSLog(@"%@",testImage);
[self.desktopView setImage:testImage];
Log of testImage (null)
Above code I am using but test image is getting nil .
Any suggestions?
Thanks in Advance !