Created
February 1, 2013 18:32
-
-
Save anthonycvella/4693134 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (IBAction)btnLogout:(id)sender { | |
TabBarViewController *tabBarViewControllerObj = [[TabBarViewController alloc] init]; | |
[Lockbox setString:@"FALSE" forKey:kLoggedinStatusKeyString]; | |
[tabBarViewControllerObj loginCheck]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface TabBarViewController : UITabBarController | |
- (void)loginCheck; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)loginCheck | |
{ | |
UIStoryboard *mainstoryboard = self.storyboard; | |
LoginViewController* loginViewController = [mainstoryboard instantiateViewControllerWithIdentifier:@"LoginViewController"]; | |
if ([[Lockbox stringForKey:kLoggedinStatusKeyString] isEqualToString:@"FALSE"]) { | |
[self presentViewController:loginViewController animated:NO completion:nil]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment