| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //
- // RABaseViewController.m
- // Apex And Drivers
- //
- // Created by Jack on 2018/6/1.
- // Copyright © 2018年 USAI. All rights reserved.
- //
- #import "RABaseViewController.h"
- #import "UIView+Toast.h"
- @interface RABaseViewController ()
- @end
- @implementation RABaseViewController
- + (NSString *)storyboardID {
- return NSStringFromClass([self class]);
- }
- + (instancetype)viewControllerFromStoryboard {
- return nil;
- }
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- - (void)showAlertTilte:(NSString *)title message:(NSString *)msg {
-
- 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 {
- if (msg.length == 0) {
- return;
- }
- [self.view makeToast:msg duration:2.0f position:CSToastPositionCenter];
- }
- @end
|