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

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

问题描述

我有一个双视图登录到我的应用程序,用户输入两个视图值信息。用户输入该信息后,我想更改哪个视图是初始视图控制器,并使登录视图成为类似设置的页面。

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天全站免登陆