diff options
author | Vitaly Takmazov | 2017-11-23 01:10:40 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-11-23 01:10:40 +0300 |
commit | 56ae98114db624dc748cc74d706e14181b22e55d (patch) | |
tree | 043ef103940f66b4a06305e2ddb609193239e08b /Juick/Model | |
parent | 78bcc152dadae837af41ab4e42fe9c95342c119e (diff) |
drop some pods
Diffstat (limited to 'Juick/Model')
-rw-r--r-- | Juick/Model/User.h | 9 | ||||
-rw-r--r-- | Juick/Model/User.m | 14 |
2 files changed, 11 insertions, 12 deletions
diff --git a/Juick/Model/User.h b/Juick/Model/User.h index ca84d50..1d4897e 100644 --- a/Juick/Model/User.h +++ b/Juick/Model/User.h @@ -6,11 +6,8 @@ // Copyright (c) 2014 com.juick. All rights reserved. // -#import <Foundation/Foundation.h> -@import PDKeychainBindingsController; -#import "SIAlertView.h" -#import "APIClient.h" -#import "YYModel.h" +@import Foundation; +@import YYModel; @interface User : NSObject @property (nonatomic, strong) NSString *uname; @@ -22,6 +19,6 @@ + (void) checkIsValid:(void(^)(BOOL))callback; -+ (void) throwUnableToLogin; ++ (void) throwUnableToLogin:(UIViewController *)view; @end diff --git a/Juick/Model/User.m b/Juick/Model/User.m index 3f860d7..38e4269 100644 --- a/Juick/Model/User.m +++ b/Juick/Model/User.m @@ -8,6 +8,8 @@ #import "User.h" +@import PDKeychainBindingsController; +#import "APIClient.h" @implementation User @@ -15,12 +17,12 @@ return [[PDKeychainBindings sharedKeychainBindings] stringForKey:@"com.juick.username"] != nil; } -+(void) throwUnableToLogin { - SIAlertView *alert = [[SIAlertView alloc] initWithTitle:@"Error" andMessage:@"Unable to login, check username/password, or network connectivity"]; - [alert addButtonWithTitle:@"OK" type:SIAlertViewButtonTypeCancel handler:^(SIAlertView *alertView) { - // <#code#> - }]; - [alert show]; ++(void) throwUnableToLogin:(UIViewController *)view { + UIAlertController *alert = [UIAlertController new]; + [alert setTitle:@"Error"]; + [alert setMessage:@"Unable to login, check username/password, or network connectivity"]; + [alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]]; + [view presentViewController:alert animated:YES completion:nil]; } +(void) checkIsValid:(void (^)(BOOL))callback { |