Skip to content

Instantly share code, notes, and snippets.

@anthonycvella
Created February 1, 2013 22:59
Show Gist options
  • Save anthonycvella/4694770 to your computer and use it in GitHub Desktop.
Save anthonycvella/4694770 to your computer and use it in GitHub Desktop.
// HomeTableViewController
- (IBAction)btnLogout:(id)sender {
self.animateBOOL = YES;
[Lockbox setString:@"FALSE" forKey:kLoggedinStatusKeyString];
[(TabBarViewController *)[self tabBarController] loginCheck:animateBOOL];
}
// TabBarViewController
- (void)loginCheck:(BOOL)animateBOOL
{
UIStoryboard *mainstoryboard = self.storyboard;
LoginViewController* loginViewController = [mainstoryboard instantiateViewControllerWithIdentifier:@"LoginViewController"];
if ([[Lockbox stringForKey:kLoggedinStatusKeyString] isEqualToString:@"FALSE"]) {
[self presentViewController:loginViewController animated:animateBOOL completion:nil];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment