So I am building a IOS app and i have a photo gallery that shows up, when you press a photo it registers and you can do something with that photo. basically what I need is when a user presses that photo I need it to open up another screen (segue) and I need to know on that new screen what that particular photo that was pressed is and set a screen sized UIViewController as that photo. the code that i currently have is
PhotoEditorViewController *editor = [[PhotoEditorViewController alloc] init];
ALAsset *asset = self.assets[indexPath.row];
ALAssetRepresentation *defaultRep = [asset defaultRepresentation];
editor.img = [UIImage imageWithCGImage:[defaultRep fullScreenImage] scale:[defaultRep scale] orientation:UIImageOrientationRight];
NSLog(@"Photo Pressed");
NSLog(@"%@", editor.img);
[self presentModalViewController:editor animated:YES];
so what this currently is doing is getting the photo that is pressd and setting my UIImage var. "img" as that image then when the segue is called i can see on the other screens viewDidLoad method that the image transferred over but for some reason i am unable to set that image as the UIImageViwer.
NSLog output:
On both screen one and screen two is shows UIImage 0x#######
Which makes me believe that the photo ID information is transferring however it’s not updating the uiimageview
ViewDidLoad
{
NSLog(@“%hhu%”, editorPhoto);
[image setImage:editorPhoto];
}