I built an application using Xcode 4.5 with storyboards. The first time the app launches I want the initial view controller to appear with terms and conditions that must be accepted to proceed. After that, I want the app to launch and skip over the first view controller and go to the second one.
I know I have to use the NSUserDefaults class and something to the effect of:
if ([[NSUserDefaults standard…] boolForKey:@”iHaveAcceptedTheTerms”])
But I have never used this class before and have no idea how to implement this code. Can someone share the specifics of how to do this?
You put in in your AppDelegate:
Then you implement in your rootViewController the terms and conditions and a way to accept it.
You will have to check if the terms are accepted, for example like this:
When accepted, the following code will change the default settings: