mirror of
https://github.com/ish-app/ish.git
synced 2026-01-25 14:06:40 +00:00
This should fix some KVO crashes due to the view controllers being initialized strangely.
19 lines
577 B
Objective-C
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
|