RABaseViewController.m 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // RABaseViewController.m
  3. // Apex And Drivers
  4. //
  5. // Created by Jack on 2018/6/1.
  6. // Copyright © 2018年 USAI. All rights reserved.
  7. //
  8. #import "RABaseViewController.h"
  9. @interface RABaseViewController ()
  10. @end
  11. @implementation RABaseViewController
  12. + (NSString *)storyboardID {
  13. return NSStringFromClass([self class]);
  14. }
  15. + (instancetype)viewControllerFromStoryboard {
  16. return nil;
  17. }
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. // Do any additional setup after loading the view.
  21. }
  22. - (void)didReceiveMemoryWarning {
  23. [super didReceiveMemoryWarning];
  24. // Dispose of any resources that can be recreated.
  25. }
  26. - (void)showAlertTilte:(NSString *)title message:(NSString *)msg {
  27. if (title.length == 0 && msg.length == 0) {
  28. return;
  29. }
  30. UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
  31. UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  32. }];
  33. [alertVC addAction:okAction];
  34. [self presentViewController:alertVC animated:YES completion:nil];
  35. }
  36. @end