






#import "WelshAngleHowViewController.h"
#import "ZoneAngleManager.h"
#import "LastDateView.h"
#import "UIColor+RetColor.h"
#import "UIDevice+EraDevice.h"
#import "UIImage+BagImage.h"
#import "DegreeNearConfig.h"


@implementation WelshAngleHowViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = ClaimMaxBig.uighurPublishPhaseMetabolicCervicalNeutral ? [UIColor loveWeightsAskMantissaMalayChallenge:ClaimMaxBig.uighurPublishPhaseMetabolicCervicalNeutral]:UIColor.whiteColor;

    self.mindVitamin = self.upscaleDays;
    [LastDateView standHave];
    

    self.topLeakyTen.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.topLeakyTen mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(fireNeverOwn) name:ClaimMaxBig.applierPatch.mildSlideMagnesiumClimbedEthernetJob object:nil];
}

- (void)fireNeverOwn {
    [self.topLeakyTen reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([ClaimMaxBig paceBannerDailyEdgaTatarName] && DegreeNearConfig.shared.outDepthDecimalNetLaunching.slidingNeed.certRelated) {
        [LastDateView currently];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)acceptingPubSize {
    UIWindow *patientWindow = [[ZoneAngleManager shared] retGigabytesWindow];
    UIEdgeInsets safe = patientWindow.safeAreaInsets;
    CGFloat maxIronNotMax = 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 underEar] || [UIDevice seeTop]) {//无刘海
            maxIronNotMax = UIScreen.mainScreen.bounds.size.height*ClaimMaxBig.funPlatformMetricsTropicalDelivered;
        }else {
            maxIronNotMax = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*ClaimMaxBig.funPlatformMetricsTropicalDelivered;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, maxIronNotMax);
        
    }else { 
        if (![UIDevice underEar] || [UIDevice seeTop]) {//无刘海
            maxIronNotMax = UIScreen.mainScreen.bounds.size.width * ClaimMaxBig.funPlatformMetricsTropicalDelivered;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                maxIronNotMax = (UIScreen.mainScreen.bounds.size.width - safe.left) * ClaimMaxBig.funPlatformMetricsTropicalDelivered;
            }else {
                maxIronNotMax = (UIScreen.mainScreen.bounds.size.width - safe.right) * ClaimMaxBig.funPlatformMetricsTropicalDelivered;
            }
        }
        return CGSizeMake(maxIronNotMax, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)consumesSmallerGopherDatumGuration {
    UIWindow *patientWindow = [[ZoneAngleManager shared] retGigabytesWindow];
    UIEdgeInsets safe = patientWindow.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.acceptingPubSize);
        }];
    }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.acceptingPubSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.acceptingPubSize);
            }];
        }
    }
}

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

@end
