






#import "BitMenRemovesViewController.h"
#import "OutDemandManager.h"
#import "NearFreeView.h"
#import "UIColor+BusColor.h"
#import "UIDevice+CutDevice.h"
#import "UIImage+FixImage.h"
#import "PersonFillConfig.h"


@implementation BitMenRemovesViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = SkinEchoMen.longerCondensedWhoDerivedFinishReported ? [UIColor cellMildStopControlsDegradedPan:SkinEchoMen.longerCondensedWhoDerivedFinishReported]:UIColor.whiteColor;

    self.groupedOpen = self.downhillHer;
    [NearFreeView treePolar];
    

    self.youWeighted.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.youWeighted mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(kilogramDown) name:SkinEchoMen.pauseKirghiz.twistBeatEyeFatColumnCut object:nil];
}

- (void)kilogramDown {
    [self.youWeighted reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([SkinEchoMen bothAllergyMatchPreserveRetName] && PersonFillConfig.shared.sceneFurlongsProtectedTopMeal.cutEverySee.treePartner) {
        [NearFreeView offerBusy];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)waxMetricSobSize {
    UIWindow *mealPenWindow = [[OutDemandManager shared] headlineSentWindow];
    UIEdgeInsets safe = mealPenWindow.safeAreaInsets;
    CGFloat hisPenTrapKit = 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 moireOld] || [UIDevice didMix]) {//无刘海
            hisPenTrapKit = UIScreen.mainScreen.bounds.size.height*SkinEchoMen.askFireTapVitalityDelay;
        }else {
            hisPenTrapKit = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*SkinEchoMen.askFireTapVitalityDelay;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, hisPenTrapKit);
        
    }else { 
        if (![UIDevice moireOld] || [UIDevice didMix]) {//无刘海
            hisPenTrapKit = UIScreen.mainScreen.bounds.size.width * SkinEchoMen.askFireTapVitalityDelay;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                hisPenTrapKit = (UIScreen.mainScreen.bounds.size.width - safe.left) * SkinEchoMen.askFireTapVitalityDelay;
            }else {
                hisPenTrapKit = (UIScreen.mainScreen.bounds.size.width - safe.right) * SkinEchoMen.askFireTapVitalityDelay;
            }
        }
        return CGSizeMake(hisPenTrapKit, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)printableScoreLanguagesExpandedMan {
    UIWindow *mealPenWindow = [[OutDemandManager shared] headlineSentWindow];
    UIEdgeInsets safe = mealPenWindow.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.waxMetricSobSize);
        }];
    }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.waxMetricSobSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.waxMetricSobSize);
            }];
        }
    }
}

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

@end
