I'm having a few troubles saving an image into a String, I've brought up the imagePicker correctly with no issues, but then saving the image is a problem, here's what I've got so far;
Code:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo {
[picker.parentViewController dismissModalViewControllerAnimated:YES];
myBackground.image = image;
myString = [[NSString alloc] initWithString:image];
myBackground.image = [UIImage imageNamed:myString];
NSUserDefaults *stringDefault = [NSUserDefaults standardUserDefaults];
[stringDefault setObject:myString forKey:@"stringKey"];
But this throws some errors on the following line
Quote:
|
myString = [[NSString alloc] initWithString:image];
|
Which are:
warning: incompatible Objective-C types 'struct UIImage *', expected 'struct NSString *' when passing argument 1 of 'initWithString:' from distinct Objective-C type
Could someone help me out here?