Right now I have an app where the first screen the users see when they open the app is the login view.
But I only want the user to see that view if it’s the first time they try to login.
Thus I want one view to appear if a certain nsuserdefault field is empty, and the Login View to appear if it isn’t.
How would I go about this?
I tried to insert an if clause in the loginview.m’s viewdidload, but apparently it’s not possible to switch to another view automatically from the viewdidload?
You should implement this in the App’s delegate. This should be done in method:
Check there for values saved in user defaults and fire appropriate controllers.
Above example should show you the idea. It uses navigation controller but the same can be done without navigation controller – by presenting the login controller modally.