






#import "ThickRulePortViewController.h"
#import "MatchMenuManager.h"
#import "TamilGetView.h"
#import "UIColor+NotColor.h"
#import "UIDevice+MinDevice.h"
#import "UIImage+WasImage.h"
#import "IllNumbersConfig.h"


@implementation ThickRulePortViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = UserArtRoot.scrollingOpenCelticSuffixLastSpouses ? [UIColor boyfriendMenJobPortraitSecureCommit:UserArtRoot.scrollingOpenCelticSuffixLastSpouses]:UIColor.whiteColor;

    self.catClipGray = self.dublinChest;
    [TamilGetView calculate];
    

    self.twoCapCycle.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.twoCapCycle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didTagsMerge) name:UserArtRoot.wayAbortLove.cancelingHeavyGaussianIntentsSobAlign object:nil];
}

- (void)didTagsMerge {
    [self.twoCapCycle reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([UserArtRoot methodImplicitResonantLengthsLiteralName] && IllNumbersConfig.shared.setupSessionTremorVarianceMail.bitsMidEnds.roleFaxGram) {
        [TamilGetView cutSuffix];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)walkEyeAxialSize {
    UIWindow *pendingWindow = [[MatchMenuManager shared] teacherDepthWindow];
    UIEdgeInsets safe = pendingWindow.safeAreaInsets;
    CGFloat pickAnchoring = 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 settling] || [UIDevice canBut]) {//无刘海
            pickAnchoring = UIScreen.mainScreen.bounds.size.height*UserArtRoot.matrixWinElectricReadySlab;
        }else {
            pickAnchoring = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*UserArtRoot.matrixWinElectricReadySlab;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, pickAnchoring);
        
    }else { 
        if (![UIDevice settling] || [UIDevice canBut]) {//无刘海
            pickAnchoring = UIScreen.mainScreen.bounds.size.width * UserArtRoot.matrixWinElectricReadySlab;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                pickAnchoring = (UIScreen.mainScreen.bounds.size.width - safe.left) * UserArtRoot.matrixWinElectricReadySlab;
            }else {
                pickAnchoring = (UIScreen.mainScreen.bounds.size.width - safe.right) * UserArtRoot.matrixWinElectricReadySlab;
            }
        }
        return CGSizeMake(pickAnchoring, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)malayBarAcuteWithinEight {
    UIWindow *pendingWindow = [[MatchMenuManager shared] teacherDepthWindow];
    UIEdgeInsets safe = pendingWindow.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.walkEyeAxialSize);
        }];
    }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.walkEyeAxialSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.walkEyeAxialSize);
            }];
        }
    }
}

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

@end
