diff options
Diffstat (limited to 'Juick/ViewControllers/RevealPanelViewController.m')
-rw-r--r-- | Juick/ViewControllers/RevealPanelViewController.m | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Juick/ViewControllers/RevealPanelViewController.m b/Juick/ViewControllers/RevealPanelViewController.m index d890f97..b74d556 100644 --- a/Juick/ViewControllers/RevealPanelViewController.m +++ b/Juick/ViewControllers/RevealPanelViewController.m @@ -16,6 +16,7 @@ #import "NavCell.h" #import "Message.h" #import "User.h" +#import "AppDelegate.h" static NSString *CellIdentifier = @"NavCell"; @@ -79,7 +80,8 @@ static NSString *CellIdentifier = @"NavCell"; -(void) signInOut { [self refreshInfo]; - [self pushLoginForm]; + AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; + [appDelegate pushLoginForm]; } -(void) viewWillLayoutSubviews { @@ -137,13 +139,6 @@ static NSString *CellIdentifier = @"NavCell"; return cell; } -- (void) pushLoginForm { - [self.revealViewController revealToggle:self]; - UIViewController *loginView = [[LoginViewController alloc] init]; - UINavigationController *messages = (UINavigationController *)self.revealViewController.frontViewController; - [messages pushViewController:loginView animated:YES]; -} - - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row = indexPath.row; NSString *targetPath; @@ -151,7 +146,8 @@ static NSString *CellIdentifier = @"NavCell"; NSString *targetTitle; if (row == 0) { if ([[PDKeychainBindings sharedKeychainBindings] stringForKey:@"com.juick.username"] == nil) { - [self pushLoginForm]; + AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; + [appDelegate pushLoginForm]; return; } else { targetTitle = @"My feed"; |