






#import "IcyHaveOffAskViewController.h"
#import "InterlaceManager.h"
#import "SpaSleetView.h"
#import "UIColor+AirColor.h"
#import "UIDevice+PopDevice.h"
#import "UIImage+UseImage.h"
#import "TaggingTwoConfig.h"


@implementation IcyHaveOffAskViewController

- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = VitalityTab.readoutForkTallEmptyDownVisit ? [UIColor shotInsidePushSpacingRenewingMetal:VitalityTab.readoutForkTallEmptyDownVisit]:UIColor.whiteColor;

    self.denyFindMen = self.moleShotRaw;
    [SpaSleetView renewRoot];
    

    self.finalizeTap.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.finalizeTap mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(uighurOurTwo) name:VitalityTab.noneMidMicro.illMultiplePronounStrengthBuddhistProviding object:nil];
}

- (void)uighurOurTwo {
    [self.finalizeTap reload];
}


- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self cloudAlongMealJustSaw];
}

//- (void)viewDidAppear:(BOOL)animated {


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([VitalityTab compareSpeedPhraseBagSolidName] && TaggingTwoConfig.shared.escapingOnlyPaceAskHertz.sawLabelAdd.waxRestores) {
        [SpaSleetView sonWindow];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)launchedBoldSize {
    UIWindow *signingWindow = [[InterlaceManager shared] waxStreamOldWindow];
    UIEdgeInsets safe = signingWindow.safeAreaInsets;
    CGFloat selectLexical = 0;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
#pragma clang diagnostic pop
    
    if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
        if (![UIDevice getPoint] || [UIDevice dryEgg]) {//无刘海
            selectLexical = UIScreen.mainScreen.bounds.size.height*VitalityTab.sumWinApplyUighurDay;
        }else {
            selectLexical = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*VitalityTab.sumWinApplyUighurDay;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, selectLexical);
        
    }else { 
        if (![UIDevice getPoint] || [UIDevice dryEgg]) {//无刘海
            selectLexical = UIScreen.mainScreen.bounds.size.width * VitalityTab.sumWinApplyUighurDay;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                selectLexical = (UIScreen.mainScreen.bounds.size.width - safe.left) * VitalityTab.sumWinApplyUighurDay;
            }else {
                selectLexical = (UIScreen.mainScreen.bounds.size.width - safe.right) * VitalityTab.sumWinApplyUighurDay;
            }
        }
        return CGSizeMake(selectLexical, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)cloudAlongMealJustSaw {
    UIWindow *signingWindow = [[InterlaceManager shared] waxStreamOldWindow];
    UIEdgeInsets safe = signingWindow.safeAreaInsets;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
#pragma clang diagnostic pop
    
    if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.launchedBoldSize);
        }];
    }else {
        
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.mas_equalTo(0);
                make.left.mas_equalTo(safe.left);
                make.size.mas_equalTo(self.launchedBoldSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.launchedBoldSize);
            }];
        }
    }
}

- (void)tabularGrayNetCompareSkipped:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [super tabularGrayNetCompareSkipped:touches withEvent:event];
    [[InterlaceManager shared] suffixBackupSchoolResourceLogBlinkViewController:self.navigationController];
}

@end
