扫码关注官方订阅号
如题,在用storyboard开发时,如果用户第一次打开则显示欢迎界面。我是在mainController里面用modal的方式显示的,但是之前会看到一下mainController的界面,我想直接进入欢迎界面,并且完成之后能够跳转回来。有没比较好的方案啊
欢迎选择我的课程,让我们一起见证您的进步~~
如下所示:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; UIStoryboard* mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; if(![[NSUserDefaults standardUserDefaults] objectForKey:@"first_launch"]){ WelcomeViewController *welcome = [mainStoryboard instantiateViewControllerWithIdentifier:@"welcome"]; window.rootViewController = welcome; [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"first_launch"]; }else{ if([[NSUserDefaults standardUserDefaults] objectForKey:@"isBind"]){ QRViewController *qreader = [mainStoryboard instantiateViewControllerWithIdentifier:@"qreader"]; window.rootViewController = qreader; }else{ BindViewController *bind = [mainStoryboard instantiateViewControllerWithIdentifier:@"bind"]; window.rootViewController = bind; } } [window makeKeyAndVisible]; return YES; }
展示的时候把动画去掉应该就看不见了
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
如下所示:
展示的时候把动画去掉应该就看不见了