






#import "TryKindBadSeeViewController.h"
#import "TagsFoggyManager.h"
#import "AuditEggView.h"
#import "UIColor+WhoColor.h"
#import "UIDevice+WhoDevice.h"
#import "UIImage+OurImage.h"
#import "StoodFocalConfig.h"


@implementation TryKindBadSeeViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = PlayDragTap.expireBorderedBridgedChapterSmileFirmware ? [UIColor brotherLargeOtherRejectionEpsilonSpa:PlayDragTap.expireBorderedBridgedChapterSmileFirmware]:UIColor.whiteColor;

    self.oddPageItem = self.tailBarTint;
    [AuditEggView sayNepali];
    

    self.sinSaltHead.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.sinSaltHead mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(specifiedCat) name:PlayDragTap.popHandshake.segmentJabberChromeBloodPubDiacritic object:nil];
}

- (void)specifiedCat {
    [self.sinSaltHead reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([PlayDragTap interruptMagentaBarrierPurchasedEffectiveName] && StoodFocalConfig.shared.legalManCousinBuddyHandover.butBeatFree.ownSunMeter) {
        [AuditEggView preparing];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)tipHasOpaqueSize {
    UIWindow *rawSkipWindow = [[TagsFoggyManager shared] armCorrectedWindow];
    UIEdgeInsets safe = rawSkipWindow.safeAreaInsets;
    CGFloat seeGoalBadArm = 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 consumes] || [UIDevice howKey]) {//无刘海
            seeGoalBadArm = UIScreen.mainScreen.bounds.size.height*PlayDragTap.noteFinnishCanYetRenewing;
        }else {
            seeGoalBadArm = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*PlayDragTap.noteFinnishCanYetRenewing;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, seeGoalBadArm);
        
    }else { 
        if (![UIDevice consumes] || [UIDevice howKey]) {//无刘海
            seeGoalBadArm = UIScreen.mainScreen.bounds.size.width * PlayDragTap.noteFinnishCanYetRenewing;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                seeGoalBadArm = (UIScreen.mainScreen.bounds.size.width - safe.left) * PlayDragTap.noteFinnishCanYetRenewing;
            }else {
                seeGoalBadArm = (UIScreen.mainScreen.bounds.size.width - safe.right) * PlayDragTap.noteFinnishCanYetRenewing;
            }
        }
        return CGSizeMake(seeGoalBadArm, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)wonIndentFullyRunOff {
    UIWindow *rawSkipWindow = [[TagsFoggyManager shared] armCorrectedWindow];
    UIEdgeInsets safe = rawSkipWindow.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.tipHasOpaqueSize);
        }];
    }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.tipHasOpaqueSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.tipHasOpaqueSize);
            }];
        }
    }
}

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

@end
