I imagine UIViewControllerhow:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
PhotoViewController *resultVC = [storyboard instantiateViewControllerWithIdentifier:NSStringFromClass([PhotoViewController class])];
[self.navigationController presentViewController:resultVC animated:YES completion:^{}];
I registered the console, and the result is:
po self.navigationController
<UINavigationController: 0x9c3e920>
But when I'm in class PhotoViewController, I registered the console, and the result:
po self.navigationController
nil
its zero is here. I do not know why this is happening. I also have this one, but its zero is always:
[self presentViewController:resultVC animated:YES completion:^{}]
source
share