I have a prepareForSegue
that passes an image like this to the next viewController
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
WizardPreview *controller = [segue destinationViewController];
controller.myPicture = myPicture;
}
On the viewWillAppear
of the viewController
being presented I have a like like this
CGImageRef imageRef = [self.myPicture CGImage];
the result is nil
The strange part is that self.myPicture
is not nil, but self.myPicture.CGImage
is.
Any reason for that?
NOTE: myPicture
is not nil when it is passed and even from viewWillAppear
, I test and I see that self.myPicture
is not nil.
NOTE 2: this is a code compiled for iOS 7 running on an iPhone with iOS 8.