Answer the question
In order to leave comments, you need to log in
How to pass an image to another view?
Passing UiImageView.image to another view doesn't work. I tried many options and as a result, instead of a picture, I get a simple deletion (zeroing) of the second image.
This is how I get the image in the first view:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage *chosenImage = info[UIImagePickerControllerEditedImage];
self.imageView.image = chosenImage;
[picker dismissViewControllerAnimated:YES completion:NULL];
}
Answer the question
In order to leave comments, you need to log in
Something strange in your code for the coolertt function - the imageView field is set to an uninitialized ViewController *. In principle, passing an image between two views is no different from passing ordinary data: www.appcoda.com/storyboards-ios-tutorial-pass-data...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question