summaryrefslogtreecommitdiff
path: root/Juick/LoginViewController.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2014-02-02 00:53:45 +0400
committerGravatar Vitaly Takmazov2014-02-02 00:53:45 +0400
commitd52c86da9751f221a24c21ec903656e279ba885a (patch)
tree1b5b8d45efe472c5e997a4ae1f2293d55291f31d /Juick/LoginViewController.m
parent552680443dea2ea5e3ce64d03dc4b6d2e39a7226 (diff)
Login info in reveal panel and login flow improvements (not complete)
Diffstat (limited to 'Juick/LoginViewController.m')
-rw-r--r--Juick/LoginViewController.m20
1 files changed, 14 insertions, 6 deletions
diff --git a/Juick/LoginViewController.m b/Juick/LoginViewController.m
index 7a4dbca..366ec96 100644
--- a/Juick/LoginViewController.m
+++ b/Juick/LoginViewController.m
@@ -7,6 +7,7 @@
//
#import "LoginViewController.h"
+#import "User.h"
@implementation LoginViewController
@@ -32,13 +33,20 @@ static NSString *CellIdentifier = @"CellIdentifier";
}
- (void) doneSignIn {
- CATransition* transition = [CATransition animation];
- transition.duration = 0.3;
- transition.type = kCATransitionFade;
- transition.subtype = kCATransitionFromTop;
+ [User checkIsValid:^(BOOL success) {
+ if (success) {
+ CATransition* transition = [CATransition animation];
+ transition.duration = 0.3;
+ transition.type = kCATransitionFade;
+ transition.subtype = kCATransitionFromTop;
+
+ [self.navigationController.view.layer addAnimation:transition forKey:kCATransition];
+ [self.navigationController popToRootViewControllerAnimated:NO];
+ } else {
+ [User throwUnableToLogin];
+ }
+ }];
- [self.navigationController.view.layer addAnimation:transition forKey:kCATransition];
- [self.navigationController popToRootViewControllerAnimated:NO];
}
-(BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {