






#import "FourSearchingViewController.h"
#import "UnpluggedManager.h"
#import "JouleBusView.h"
#import "UIColor+DryColor.h"
#import "UIDevice+IcyDevice.h"
#import "UIImage+WhoImage.h"
#import "OnePopSongConfig.h"


@implementation FourSearchingViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = PinMovement.developerTaggingButThumbShearPrivacy ? [UIColor earStartDiscardsPairDirtyGlyph:PinMovement.developerTaggingButThumbShearPrivacy]:UIColor.whiteColor;

    self.extraMaxAdd = self.modalKeyDid;
    [JouleBusView warnSurge];
    

    self.fivePubSize.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.fivePubSize mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(yetRingLevel) name:PinMovement.cupFormatSun.requestedInferAwaySharpenEngravedHue object:nil];
}

- (void)yetRingLevel {
    [self.fivePubSize reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([PinMovement revokedDutchSurgeAdditiveInferName] && OnePopSongConfig.shared.resultLaunchedLateRomanianState.yearHitTall.lookLetters) {
        [JouleBusView focusLive];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)sindhiKeyFaxSize {
    UIWindow *spousesWindow = [[UnpluggedManager shared] gainMusicMayWindow];
    UIEdgeInsets safe = spousesWindow.safeAreaInsets;
    CGFloat sawPutWonSeed = 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 integral] || [UIDevice paddle]) {//无刘海
            sawPutWonSeed = UIScreen.mainScreen.bounds.size.height*PinMovement.dayListenCustodianIrregularMeasure;
        }else {
            sawPutWonSeed = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*PinMovement.dayListenCustodianIrregularMeasure;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, sawPutWonSeed);
        
    }else { 
        if (![UIDevice integral] || [UIDevice paddle]) {//无刘海
            sawPutWonSeed = UIScreen.mainScreen.bounds.size.width * PinMovement.dayListenCustodianIrregularMeasure;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                sawPutWonSeed = (UIScreen.mainScreen.bounds.size.width - safe.left) * PinMovement.dayListenCustodianIrregularMeasure;
            }else {
                sawPutWonSeed = (UIScreen.mainScreen.bounds.size.width - safe.right) * PinMovement.dayListenCustodianIrregularMeasure;
            }
        }
        return CGSizeMake(sawPutWonSeed, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)bufferedBreakPlayProvisionDry {
    UIWindow *spousesWindow = [[UnpluggedManager shared] gainMusicMayWindow];
    UIEdgeInsets safe = spousesWindow.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.sindhiKeyFaxSize);
        }];
    }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.sindhiKeyFaxSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.sindhiKeyFaxSize);
            }];
        }
    }
}

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

@end
