ish/app/UIViewController+Extras.m
Saagar Jha 69ff9f6f17 Dismiss about view controller correctly
This should fix some KVO crashes due to the view controllers being
initialized strangely.
2020-11-11 22:36:15 -08:00

19 lines
577 B
Objective-C

//
// UIViewController+Extras.m
// iSH
//
// Created by Theodore Dubois on 9/23/18.
//
#import "UIViewController+Extras.h"
@implementation UIViewController (Extras)
- (void)presentError:(NSError *)error title:(NSString *)title {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:error.localizedDescription preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:alert animated:YES completion:nil];
}
@end