I am trying to load UIImage object from NSData, and the sample code was to NSImage, I guess they should be the same. But just now load
UIImage
NSData
NSImage
Try this to convert an image to NSdata:
UIImage *img = [UIImage imageNamed:@"image.png"]; NSData *data1 = UIImagePNGRepresentation(img);