I need to present view controller from App Delegate I did it by the following code:
MyViewController *controller = [[MyViewController alloc] init];
[self.window.rootViewController presentViewController:controller animated:YES completion:NULL];
Application Shows Black Screen. How can I do that?
You need to set RootViewController of window as :
MyViewController *controller = [[MyViewController alloc] init];
[self.window setRootViewController:controller];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.