线上所有马甲包模板,与《猎豆》同UI。域名zhuadd

HSQBaseViewController.m 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // HSQBaseViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/1/16.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "HSQBaseViewController.h"
  9. #import "ActivityIndicatorView.h"
  10. @interface HSQBaseViewController ()
  11. @end
  12. @implementation HSQBaseViewController
  13. - (void)viewWillAppear:(BOOL)animated {
  14. [super viewWillAppear:animated];
  15. [self.view bringSubviewToFront:self.navigationBar];
  16. self.navigationController.navigationBar.hidden = YES;
  17. }
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. self.view.backgroundColor = [UIColor YHColorWithHex:0xf5f4f4];
  21. if ([self respondsToSelector:@selector(setAutomaticallyAdjustsScrollViewInsets:)]) {
  22. self.automaticallyAdjustsScrollViewInsets = NO;
  23. }
  24. [self initUI];
  25. }
  26. - (void)initUI {
  27. self.navigationBar = [[HSQNavigationBar alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, NavBarHeight)];
  28. [self.view addSubview:self.navigationBar];
  29. }
  30. - (void)showLoadingView {
  31. ActivityIndicatorView *activityView = [[ActivityIndicatorView alloc] initWithTintColor:@[[UIColor redColor],[UIColor yellowColor],[UIColor blueColor]] size:50];
  32. activityView.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height) ;
  33. activityView.backgroundColor = [UIColor whiteColor];
  34. [self.view addSubview:activityView];
  35. [activityView startAnimating];
  36. activityView.tag = 11001;
  37. }
  38. - (void)dismissLoadingView {
  39. ActivityIndicatorView *activityView = (ActivityIndicatorView *)[self.view viewWithTag:11001];
  40. [activityView stopAnimating];
  41. }
  42. - (void)didReceiveMemoryWarning {
  43. [super didReceiveMemoryWarning];
  44. // Dispose of any resources that can be recreated.
  45. }
  46. /*
  47. #pragma mark - Navigation
  48. // In a storyboard-based application, you will often want to do a little preparation before navigation
  49. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  50. // Get the new view controller using [segue destinationViewController].
  51. // Pass the selected object to the new view controller.
  52. }
  53. */
  54. @end