summaryrefslogtreecommitdiff
path: root/Juick/AppDelegate.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-01-19 23:38:50 +0300
committerGravatar Vitaly Takmazov2017-01-19 23:38:50 +0300
commit917fd3b930b8c25551b751608b9bd0dd104b56e5 (patch)
treef6e5d623c402d83b2868cb07b963c0bc5af5150f /Juick/AppDelegate.m
parent87c992e9db9464215d12a3987fe384d65e96bc50 (diff)
Handle changed password
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r--Juick/AppDelegate.m36
1 files changed, 10 insertions, 26 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m
index 51304dc..8240892 100644
--- a/Juick/AppDelegate.m
+++ b/Juick/AppDelegate.m
@@ -17,6 +17,8 @@
@implementation AppDelegate
+SWRevealViewController *reveal;
+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UINavigationBar appearance] setTintColor:[ColorScheme linkColor]];
@@ -29,7 +31,7 @@
UINavigationController *main = [[UINavigationController alloc] initWithRootViewController:messages];
UINavigationController *rearNav = [[UINavigationController alloc] initWithRootViewController:rear];
- SWRevealViewController *reveal = [[SWRevealViewController alloc] initWithRearViewController:rearNav frontViewController:main];
+ reveal = [[SWRevealViewController alloc] initWithRearViewController:rearNav frontViewController:main];
self.viewController = reveal;
[messages.navigationController.navigationBar addGestureRecognizer:reveal.panGestureRecognizer];
UIBarButtonItem *revealButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"reveal-icon.png"]
@@ -58,31 +60,13 @@
return YES;
}
-- (void)applicationWillResignActive:(UIApplication *)application
-{
- // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
- // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
-}
-
-- (void)applicationDidEnterBackground:(UIApplication *)application
-{
- // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
- // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
-}
-
-- (void)applicationWillEnterForeground:(UIApplication *)application
-{
- // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
-}
-
-- (void)applicationDidBecomeActive:(UIApplication *)application
-{
- // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
-}
-
-- (void)applicationWillTerminate:(UIApplication *)application
-{
- // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+- (void) pushLoginForm {
+ if ([reveal isBeingPresented]) {
+ [reveal revealToggle:self];
+ }
+ UIViewController *loginView = [[LoginViewController alloc] init];
+ UINavigationController *messages = (UINavigationController *)reveal.frontViewController;
+ [messages pushViewController:loginView animated:YES];
}
@end