单军华
2018-07-12 3e8437ae559487362fae3525beb79c534c213a51
screendisplay/screendisplay/Classes/Base/BaseControllers/LMJBaseViewController.m
New file
@@ -0,0 +1,73 @@
//
//  LLMJBBaseViewController.m
//  PLMMPRJK
//
//  Created by windshan on 2017/4/11.
//  Copyright © 2017年 GoMePrjk. All rights reserved.
//
#import "LMJBaseViewController.h"
@interface LMJBaseViewController ()
@end
@implementation LMJBaseViewController
#pragma mark - 生命周期
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
    self.automaticallyAdjustsScrollViewInsets = NO;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (@available(iOS 11.0, *)){
            [[UIScrollView appearanceWhenContainedInInstancesOfClasses:@[[LMJBaseViewController class]]] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
        }
    });
}
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
}
- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
}
- (void)viewDidDisappear:(BOOL)animated
{
    [super viewDidDisappear:animated];
}
- (instancetype)initWithTitle:(NSString *)title
{
    if (self = [super init]) {
        self.title = title.copy;
    }
    return self;
}
- (void)dealloc
{
    NSLog(@"dealloc---%@", self.class);
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}
@end