省钱达人

DRBaseViewController.m 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // DRBaseViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/1/16.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "DRBaseViewController.h"
  9. @interface DRBaseViewController ()
  10. @end
  11. @implementation DRBaseViewController
  12. - (void)viewWillAppear:(BOOL)animated {
  13. [super viewWillAppear:animated];
  14. [self.view bringSubviewToFront:self.navigationBar];
  15. }
  16. - (void)viewDidLoad {
  17. [super viewDidLoad];
  18. self.view.backgroundColor = [UIColor YHColorWithHex:0xf5f4f4];
  19. if ([self respondsToSelector:@selector(setAutomaticallyAdjustsScrollViewInsets:)]) {
  20. self.automaticallyAdjustsScrollViewInsets = NO;
  21. }
  22. [self initUI];
  23. }
  24. - (void)initUI {
  25. self.navigationBar = [[DRNavigationBar alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, NavBarHeight)];
  26. [self.view addSubview:self.navigationBar];
  27. }
  28. - (void)didReceiveMemoryWarning {
  29. [super didReceiveMemoryWarning];
  30. // Dispose of any resources that can be recreated.
  31. }
  32. /*
  33. #pragma mark - Navigation
  34. // In a storyboard-based application, you will often want to do a little preparation before navigation
  35. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  36. // Get the new view controller using [segue destinationViewController].
  37. // Pass the selected object to the new view controller.
  38. }
  39. */
  40. @end