diff options
author | Vitaly Takmazov | 2014-02-02 00:53:45 +0400 |
---|---|---|
committer | Vitaly Takmazov | 2014-02-02 00:53:45 +0400 |
commit | d52c86da9751f221a24c21ec903656e279ba885a (patch) | |
tree | 1b5b8d45efe472c5e997a4ae1f2293d55291f31d /Juick/LoginViewController.m | |
parent | 552680443dea2ea5e3ce64d03dc4b6d2e39a7226 (diff) |
Login info in reveal panel and login flow improvements (not complete)
Diffstat (limited to 'Juick/LoginViewController.m')
-rw-r--r-- | Juick/LoginViewController.m | 20 |
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 { |