I have this problem when I simulate my app, its not an error or a warning but it appears in my console, has anyone ever experienced this before?
In my case I was fetching NSData
from NSURL
inside 'viewDidLoad
' method.
I got this issue because I was calling a UIPrintInteractionController from a viewController without UITabbar, and neither UINavigationBar. It seems that the UIPrintInteractionController didn't get the correct printInteractionControllerParentViewController. Implementing the method in the delegate and return the current rootViewController worked for me.
- (UIViewController*)printInteractionControllerParentViewController:(UIPrintInteractionController*)printInteractionController;
The situation can occur if you are adding a view with a modal view controller as a sub view. Best to use:
-(void) viewDidAppear:(BOOL)animated {
[self presentViewController:self.yourModalVC animated:YES completion:nil];
}
It is basically saying the view life cycle is not streamlined for those viewControllers you are trying to display then.
I have the similar problem when trying to do:
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES];
in a function like - (void) popUpToLevelTwo;
, and to put a return;
at the end of function solves the problem
one solution would be,
[NSTimer scheduledTimerWithTimeInterval:0.05(or as required) target:self
selector:@selector(your_selector_method_to_push_the_view) userInfo:nil repeats:NO];
For what it's worth, I got this same error when not including a call to [super viewDidLoad:animated]
in my viewDidLoad
override.