123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- //
- // LDBaseViewController.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/1/16.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "LDBaseViewController.h"
- #import "ActivityIndicatorView.h"
- @interface LDBaseViewController ()
- @end
- @implementation LDBaseViewController
- - (void)viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
- [self.view bringSubviewToFront:self.navigationBar];
- self.navigationController.navigationBar.hidden = YES;
- }
- - (void)viewDidLoad {
- [super viewDidLoad];
- self.view.backgroundColor = [UIColor YHColorWithHex:0xf5f4f4];
- if ([self respondsToSelector:@selector(setAutomaticallyAdjustsScrollViewInsets:)]) {
- self.automaticallyAdjustsScrollViewInsets = NO;
- }
- [self initUI];
- }
- - (void)initUI {
- self.navigationBar = [[LDNavigationBar alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, NavBarHeight)];
- [self.view addSubview:self.navigationBar];
- }
- - (void)showLoadingView {
- ActivityIndicatorView *activityView = [[ActivityIndicatorView alloc] initWithTintColor:@[[UIColor redColor],[UIColor yellowColor],[UIColor blueColor]] size:50];
- activityView.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height) ;
- activityView.backgroundColor = [UIColor whiteColor];
- [self.view addSubview:activityView];
- [activityView startAnimating];
- activityView.tag = 11001;
- }
- - (void)dismissLoadingView {
- ActivityIndicatorView *activityView = (ActivityIndicatorView *)[self.view viewWithTag:11001];
- [activityView stopAnimating];
-
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- @end
|