Frage

in my app i have a tab bar controller that has 4 different views.

i want to create a new view that will be loaded only one time and will not be a part of the tabs that i currently have, meaning that this view is not navigable, ( tho you will be able to reach to it from the setting tab afterwards) the idea is to create a view that will be the first view to be loaded after install and will not be shown again, this view will be used for SMS verification purposes - this is the reason the it will be loaded only once after install and the user will be able to navigate to it afterwards fro mthe setting view that is located on one of the existing tabs.

any ideas of how to implements it ?

Thanks Roi

War es hilfreich?

Lösung

Create a custom view controller class. If you're using storyboards, define a scene for that view controller's interface. Give it a unique storyboard identifier.

When you need to display it, just load it from the storyboard using instantiateViewControllerWithIdentifier: and invoke it using presentViewController:animated:completion:. That will push it as a modal. If you want it to be the first view controller the user sees on initial launch, invoke it during viewWillAppear, with animated:NO. That way the new view controller will be displayed before your tabbed view controller appears.

Then you can instantiate and display it any time you need to, from anywhere you need to.

Andere Tipps

Check out this thread.

Basically you can use what's called NSUserDefaults. The user defaults can be used as settings within your app. When the user views your initial launch view, set a key in the user defaults and check that key for every load of your app thereafter.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top