首次启动应用程序后更改初始视图控制器 [英] Change initial view controller after first launch of app

查看:24
本文介绍了首次启动应用程序后更改初始视图控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序有两个视图登录,用户可以在其中输入两个视图的信息.在用户输入该信息后,我想更改哪个视图是初始视图控制器,并使登录视图成为类似设置的页面.

I have a two-view login to my app where a user enters two views worth of info. After the user has entered that info I want change which view is the initial view controller, and have the login view be a settings-like page.

在用户通过应用中的某个点后,如何更改初始视图控制器?

How can I change the initial view controller after the user has passed a certain point in the app?

推荐答案

对于我的一个应用程序,我做了类似的事情,我让我的主"视图控制器在 viewDidLoad 上检查默认设置中的设置指示用户是否已登录.如果他们没有登录,我立即推送没有动画的 loginViewController,用户填写相应的表单.当它被关闭时,我在主视图控制器中重新加载了视图.

For one of my apps, where I did similar to this, I have my "main" view controller check on viewDidLoad for a setting in the default settings that would indicate if the user had signed in. If they hadn't, I immediately pushed the loginViewController without animation and the user filled in the appropriate forms. When that was dismissed, I reloaded the view in my main view controller.

我的客户喜欢这个应用,而且看起来不错.

My client liked the app and it looked nice.

这篇关于首次启动应用程序后更改初始视图控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆