I really struct for the simple problem.
I am simply moving from one view controller to another view controller using the following code.
homescreen *home;
home=[self.storyboard instantiateViewControllerWithIdentifier:@"home"];
[self presentViewController:home animated:YES completion:nil];
Same code tried using in AppDelegate
method.
UIStoryboard *storyboard;
sur= [storyboard instantiateViewControllerWithIdentifier:@"survey"];
[self.window.rootViewController presentViewController:sur animated:YES completion:nil];
When I am using this code I get this crash:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present a nil modal view controller on target
i don't want to make it as root view controller ,simply i need to move it.