diff options
Diffstat (limited to 'Juick/Model/User.m')
-rw-r--r-- | Juick/Model/User.m | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/Juick/Model/User.m b/Juick/Model/User.m index ee3cce8..2401c7e 100644 --- a/Juick/Model/User.m +++ b/Juick/Model/User.m @@ -21,19 +21,4 @@ return user; } -+(void) throwUnableToLogin:(UIViewController *)view error:(NSError *)error path:(NSString *)path params:(NSDictionary *)params { - UIAlertController *alert = [UIAlertController new]; - NSString *title = error.userInfo[@"url"] ? error.userInfo[@"url"] : @"Something went wrong"; - [alert setTitle:title]; - [alert setMessage:[NSString stringWithFormat:@"err: %@, path: %@, params: %@", error.localizedDescription, path, params]]; - [alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]]; - UIPopoverPresentationController *popover = [alert popoverPresentationController]; - if (popover) { - popover.sourceView = view.view; - popover.sourceRect = CGRectMake(CGRectGetMidX(view.view.bounds), CGRectGetMidY(view.view.bounds), 0, 0); - popover.permittedArrowDirections = UIPopoverArrowDirectionDown; - } - [view presentViewController:alert animated:YES completion:nil]; -} - @end |