简体   繁体   中英

Swift Navigation Controller show on launch

I create an app that can login, sign up and display list of users by using navigation controller and table view.

When user not logged in, then show the login page, otherwise show to list users page

But when app launching, the navigate controller always show first ether logged in or not. How can I hide that navigate on launching

Edit: initial controller is ViewController, navigation root view is the right one

在此处输入图片说明

在此处输入图片说明

For this I recommend you to take a different approach. Set your Users View Controller as the initial View Controller, and check if the user is logged in inside viewDidAppear . If they're not logged in, present the login page.

我不知道发生了什么,我只是重新启动了Mac,它按预期运行得很好

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM