






#import "SeeWhiteGuestViewController.h"
#import "JobDegreeManager.h"
#import "MixDirtyView.h"
#import "UIColor+RedColor.h"
#import "UIDevice+RowDevice.h"
#import "UIImage+TooImage.h"
#import "PricePointConfig.h"


@implementation SeeWhiteGuestViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = SchemesSong.youExportOrderingSignalingSaveTouch ? [UIColor layerPongOddProvinceCalorieManaged:SchemesSong.youExportOrderingSignalingSaveTouch]:UIColor.whiteColor;

    self.justExtents = self.minimumLine;
    [MixDirtyView polarYear];
    

    self.holdBothAir.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.holdBothAir mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(maskDutchNow) name:SchemesSong.targetRemote.fragmentsHalfFarthestPutAnyRestoring object:nil];
}

- (void)maskDutchNow {
    [self.holdBothAir reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([SchemesSong binarySuddenAnyImageSortName] && PricePointConfig.shared.usabilityChinaUnlimitedAwayPeople.sayManFoggy.manSendGolf) {
        [MixDirtyView vowelBook];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)visualServerSize {
    UIWindow *pushCanWindow = [[JobDegreeManager shared] wasDraftSockWindow];
    UIEdgeInsets safe = pushCanWindow.safeAreaInsets;
    CGFloat depthLockDeny = 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 twoInput] || [UIDevice mayLaw]) {//无刘海
            depthLockDeny = UIScreen.mainScreen.bounds.size.height*SchemesSong.validitySobAtomicOutExponents;
        }else {
            depthLockDeny = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*SchemesSong.validitySobAtomicOutExponents;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, depthLockDeny);
        
    }else { 
        if (![UIDevice twoInput] || [UIDevice mayLaw]) {//无刘海
            depthLockDeny = UIScreen.mainScreen.bounds.size.width * SchemesSong.validitySobAtomicOutExponents;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                depthLockDeny = (UIScreen.mainScreen.bounds.size.width - safe.left) * SchemesSong.validitySobAtomicOutExponents;
            }else {
                depthLockDeny = (UIScreen.mainScreen.bounds.size.width - safe.right) * SchemesSong.validitySobAtomicOutExponents;
            }
        }
        return CGSizeMake(depthLockDeny, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)unitZoneSignerAlphabetDecay {
    UIWindow *pushCanWindow = [[JobDegreeManager shared] wasDraftSockWindow];
    UIEdgeInsets safe = pushCanWindow.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.visualServerSize);
        }];
    }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.visualServerSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.visualServerSize);
            }];
        }
    }
}

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

@end
