简体   繁体   中英

Walkthrough with tab view controller

I have been attempting to create a walkthrough for my app although I also have a tab view controller which is the initial view controller. I have been able to identify when a user is opening the app for the first time, but when I make the walkthrough view controller initial, I get a Sigbart error. This is because I set up my tabbar in the app delegate.

Is there a way to possibly keep the tab bar VC the initial and hide the first VC if it is the users first time opening the app?

Is there another way of doing it?

There easiest way to accomplish the tutorial-like behavior for new users is:

1) Make a new View Controller be the initial one.

2) Add code to check if its the first time the user launched the app. If it is, show the tutorial, if its not, show your tab view controller.

3) You can fill this "fake initial" view controller with the same image shown in the splash screen. This way the user will feel its just the splash one.

*) An added benefit of this approach is that you can check other useful things. For example, if your app has some kind of login feature you can manage it here skipping the login window for users who have already logged in. It can also be used to update your app's resources in case you are retrieving them from a server.

I dont know the code to check of its the flrst time a user opens an app, but why dont you make that check on your tab bar controller? And then lf lt ls the first time, you just change the root vc to the tutorial vc. When they are done with the tutorial you just change back the root vc to the tab bar.

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