so this is how my software should run.
I have an agreement viewcontroller which will display and ask users if they agree with our policy prior to running the software. Once the users agree by pressing an ‘agree’ button, it will disappear and never be shown again to them.
The problem is that I have to check if they previously agreed or not before loading views and decide if the program can skip the agreement page… and I’m not sure where to do it.
viewDidLoad() is definitely not the one cuz it’s literally called after a view is loaded. I tried with iniWithCoder() and no luck. I tried with didfinishlaunchingwithoptions() but it seems like storyboard doesn’t call it 🙁 …
Any advice for me plz?
I will be digging in iOS Developer Library while waiting for your advice. Thank you!
What you should do is record the fact that they clicked on the page in NSUserDefaults. From next time on check the NSUserDefaults and if it is present in that, do not show the page.
Some sample code, you can put in the App Delegate or in your view controller logic.