I am getting the following error in iOS9 only.
Here is my code:-
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDi
I had to remove this line from application didFinishLaunchingWithOptions:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
And that fixed it for me.
Using this row solved my issue (iOS 10):
[self.window setRootViewController:self.navigationController];
Was (worked for older iOS and Xcode):
[self.window addSubview:navigationController.view];
here i got the solution by checking if navigationController is nil or not:-
if (self.navigationController== nil)
{
self.navigationController = [[BufferedNavigationController alloc] initWithRootViewController:self.firstViewController];
}
else
{
[self.navigationController setViewControllers:@[self.firstViewController] animated:NO];
}