I have a simple UINavigationViewControllerone that, when I select a specific element, creates a modal view in which it is located inside it UIImageView(PostcardViewController). However, if I call
PostcardViewController *postcardViewController = [[PostcardViewController alloc] init];
postcardViewController.imageView.image = image;
[self.navigationController presentModalViewController:postcardViewController animated:YES];
postcardViewController.imageViewis nil and the image is never displayed. If I switch the last two lines and do this:
PostcardViewController *postcardViewController = [[PostcardViewController alloc] init];
[self.navigationController presentModalViewController:postcardViewController animated:YES];
postcardViewController.imageView.image = image;
postcardViewController.imageViewinstalled and it displays well. Everything is connected in Interface Builder, and the PostcardViewController does not have any special code in it. After debugging, I came to the conclusion that after [ viewDidLoad] was called, that imageView was connected, and [ viewDidLoad] received the call when I called [ presentModalViewController].
, - ? , , , , .