|
|
@@ -7,6 +7,7 @@
|
|
|
//
|
|
|
|
|
|
#import "RABaseViewController.h"
|
|
|
+#import "UIView+Toast.h"
|
|
|
|
|
|
@interface RABaseViewController ()
|
|
|
|
|
|
@@ -37,15 +38,19 @@
|
|
|
if (title.length == 0 && msg.length == 0) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
|
|
|
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
|
|
-
|
|
|
+
|
|
|
}];
|
|
|
-
|
|
|
+
|
|
|
[alertVC addAction:okAction];
|
|
|
-
|
|
|
+
|
|
|
[self presentViewController:alertVC animated:YES completion:nil];
|
|
|
}
|
|
|
|
|
|
+- (void)showAlert:(NSString *)msg {
|
|
|
+ [self.view makeToast:msg duration:2.0f position:CSToastPositionCenter];
|
|
|
+}
|
|
|
+
|
|
|
@end
|