How do you save a picture with NSUserDefaults?
问题 I have a iPad app that can take a picture and then put it within a image view. How do I go about saving the pic that I have stored in the image view? Here is what I have tried so far: [imageView setImage:[[NSUserDefaults standardUserDefaults] objectForKey:@"storedImageValue6"]]; 回答1: Pretty much you have to convert it to NSData and vice versa. Take a look at this link: Save images in NSUserDefaults? 回答2: Here imageSet is UIImage NSData *imagedata=UIImagePNGRepresentation(imageSet); [