






#import "GetWrongValueViewController.h"
#import "MatrixFixManager.h"
#import "SumSmileView.h"
#import "UIColor+AddColor.h"
#import "UIDevice+SonDevice.h"
#import "UIImage+SunImage.h"
#import "HundredTagConfig.h"


@implementation GetWrongValueViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = DistantEach.kernelsRecoveryDrizzleAlonePrivilegeFuture ? [UIColor bleedAggregateDidCaretRecognizeStore:DistantEach.kernelsRecoveryDrizzleAlonePrivilegeFuture]:UIColor.whiteColor;

    self.wristInland = self.barsOptSpan;
    [SumSmileView secretMin];
    

    self.visualGrade.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.visualGrade mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(redirectsFun) name:DistantEach.whoFrenchMin.pinKazakhProxyHeadlineAcceptedShelf object:nil];
}

- (void)redirectsFun {
    [self.visualGrade reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([DistantEach statementWeightRunningRadialColorName] && HundredTagConfig.shared.forwardVirtualActivatedShortNow.sumRatioEye.pressWindow) {
        [SumSmileView gramTorch];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)stillPurposeSize {
    UIWindow *artMoveWindow = [[MatrixFixManager shared] lawStylisticWindow];
    UIEdgeInsets safe = artMoveWindow.safeAreaInsets;
    CGFloat oddDayBitThat = 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 rightSin] || [UIDevice hexMay]) {//无刘海
            oddDayBitThat = UIScreen.mainScreen.bounds.size.height*DistantEach.deviceRefreshedDoneRefreshedPrefixes;
        }else {
            oddDayBitThat = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*DistantEach.deviceRefreshedDoneRefreshedPrefixes;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, oddDayBitThat);
        
    }else { 
        if (![UIDevice rightSin] || [UIDevice hexMay]) {//无刘海
            oddDayBitThat = UIScreen.mainScreen.bounds.size.width * DistantEach.deviceRefreshedDoneRefreshedPrefixes;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                oddDayBitThat = (UIScreen.mainScreen.bounds.size.width - safe.left) * DistantEach.deviceRefreshedDoneRefreshedPrefixes;
            }else {
                oddDayBitThat = (UIScreen.mainScreen.bounds.size.width - safe.right) * DistantEach.deviceRefreshedDoneRefreshedPrefixes;
            }
        }
        return CGSizeMake(oddDayBitThat, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)persistEachOutObserveReveal {
    UIWindow *artMoveWindow = [[MatrixFixManager shared] lawStylisticWindow];
    UIEdgeInsets safe = artMoveWindow.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.stillPurposeSize);
        }];
    }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.stillPurposeSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.stillPurposeSize);
            }];
        }
    }
}

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

@end
