-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathUIAlertController+Fast.m
39 lines (25 loc) · 1.27 KB
/
UIAlertController+Fast.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#import "UIAlertController+Fast.h"
@implementation UIAlertController (Fast)
-(void)showAlertControllerWithVC:(UIViewController *)VC withMessage:(NSString *)message withTitle:(NSString *)title {
UIAlertController* alert = [UIAlertController alertControllerWithTitle:title
message:message
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
}];
[alert addAction:defaultAction];
[VC presentViewController:alert animated:YES completion:nil];
}
+(void)showAlertControllerWithVC:(UIViewController *)VC withMessage:(NSString *)message withTitle:(NSString *)title {
UIAlertController* alert = [UIAlertController alertControllerWithTitle:title
message:message
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
}];
[alert addAction:defaultAction];
[VC presentViewController:alert animated:YES completion:nil];
}
@end