ASBaseViewController.m 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // ASBaseViewController.m
  3. // Asteria
  4. //
  5. // Created by iOS on 2023/4/24.
  6. //
  7. #import "ASBaseViewController.h"
  8. @interface ASBaseViewController ()
  9. @end
  10. @implementation ASBaseViewController
  11. - (void)viewDidLoad {
  12. [super viewDidLoad];
  13. [self addBaseNav];
  14. self.navigationController.navigationBar.hidden = true;
  15. self.view.backgroundColor = _F8F8F8;
  16. }
  17. - (void)addBaseNav {
  18. [self.view addSubview:self.statusBgV];
  19. [self.view addSubview:self.customNavBar];
  20. self.statusBgV.frame = CGRectMake(0, 0, KScreenWidth, kStatusBarH);
  21. self.customNavBar.frame = CGRectMake(0, kStatusBarH, KScreenWidth, kCustomNavBarH);
  22. }
  23. - (UIView *)statusBgV {
  24. if (!_statusBgV) {
  25. UIView *v = [UIView baseV];
  26. v.backgroundColor = _32CFB0;
  27. _statusBgV = v;
  28. }
  29. return _statusBgV;
  30. }
  31. - (UIView *)customNavBar {
  32. if (!_customNavBar) {
  33. UIView *v = [UIView baseV];
  34. v.backgroundColor = _32CFB0;
  35. _customNavBar = v;
  36. }
  37. return _customNavBar;
  38. }
  39. @end