Appdelegate.m
- (BOol)application:(UIApplication *)application dIDFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HasLaunchedOnce"]) { NSLog(@"not first launch"); self.vIEwController = [[UIStoryboard storyboarDWithname:@"Main_iPhone" bundle:nil] instantiateVIEwControllerWithIDentifIEr:@"articlesNav"]; self.window.rootVIEwController = self.vIEwController; } else { [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"HasLaunchedOnce"]; [[NSUserDefaults standardUserDefaults] synchronize]; self.vIEwController = [[UIStoryboard storyboarDWithname:@"Main_iPhone" bundle:nil] instantiateVIEwControllerWithIDentifIEr:@"articlesNav"]; self.window.rootVIEwController = self.vIEwController; EditorsNoteVIEwController *vc = [[EditorsNoteVIEwController alloc]init]; [self.vIEwController.navigationController presentVIEwController:vc animated:YES completion:nil];} [self.window makeKeyAndVisible]; return YES;}解决方法 我发现你必须打电话
[self.window makeKeyAndVisible];
在呈现视图控制器之前
总结以上是内存溢出为你收集整理的ios – 如何在应用程序启动时以模态方式呈现View Controller?全部内容,希望文章能够帮你解决ios – 如何在应用程序启动时以模态方式呈现View Controller?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)