
In SignUpViewController.m file - (IBAction)actionSignup:(id)senderĪppDelegate *appDelegateTemp = delegate] Ī = ] instantiateInitialViewController] UIViewController* rootController = ] navigation = initWithRootViewController:rootController] In your appDelegate.m inside your didFinishLaunchingWithOptions //authenticatedUser: check from NSUserDefaults User credential if its present then set your navigation flow accordingly I'm just not sure what the best method is at this point. I've considered making the login screen the root view controller, or creating a navigation controller in the AppDelegate to handle everything. I need a way to clear this easily on logout. If they login to a new account, the old account data is still displayed until they refresh.
#Logicworks 5 clear the open existing design code#
I've tried moving the code to viewWillAppear but the segue will not work that early. The first time they launch the app, the Tab Bar Controller shows briefly before the segue is performed.This all works fine, but I'm wondering: should this logic be in the AppDelegate? I also have two issues:

Upon logout, I clear the credentials from the Keychain, run and perform the segue to show the login view controller again. I also setup a notification for when the logout action needs to be performed: addObserver:self object:nil] Inside my Tab Bar Controller class, I check whether they are logged in inside the viewDidAppear method, and a perform the segue: What I've done so far is set the root view controller to the Tab Bar Controller, and created a custom segue to my Login view controller.

When they login, go to the first tab of the Tab Bar Controller. Show a login screen the first time the app is launched.I need to know the BEST way to set all this up. I'm creating the login/logout process, and it's mostly working fine, but I've got a few issues. The root view controller is a Tab Bar Controller. I'm building an iOS app using a Storyboard.
