ASBaseViewController.m 969 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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.view.backgroundColor = _F8F8F8;
  15. }
  16. - (void)addBaseNav {
  17. [self.view addSubview:self.statusBgV];
  18. [self.view addSubview:self.customNavBar];
  19. self.statusBgV.frame = CGRectMake(0, 0, AScreenWidth, kStatusBarH);
  20. self.customNavBar.frame = CGRectMake(0, kStatusBarH, AScreenWidth, kCustomNavBarH);
  21. }
  22. - (UIView *)statusBgV {
  23. if (!_statusBgV) {
  24. UIView *v = [UIView baseV];
  25. v.backgroundColor = _32CFB0;
  26. _statusBgV = v;
  27. }
  28. return _statusBgV;
  29. }
  30. - (UIView *)customNavBar {
  31. if (!_customNavBar) {
  32. UIView *v = [UIView baseV];
  33. v.backgroundColor = _32CFB0;
  34. _customNavBar = v;
  35. }
  36. return _customNavBar;
  37. }
  38. @end