So I'm trying to save an image taken from UIImagePickerController to NSUserDefaults so I can open it up in an album I generate, but when I call the delegate method to save the picture, I get the error:
[NSUserDefaults setObject:forKey:]: Attempt to insert non-property value '<UIImage: 0x1d0bf0>' of class 'UIImage'. Note that dictionaries and arrays in property lists must also contain only property values.`
The code is as follows:
self.savedPic = [[UIImage alloc] init];
self.savedPic = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
[[NSUserDefaults standardUserDefaults] setValue:self.savedPic forKey:[NSString stringWithFormat:@"image_%i",imageCount]];