






#import "SeekFourWaterViewController.h"
#import "LocationsManager.h"
#import "IdiomFitView.h"
#import "UIColor+HisColor.h"
#import "UIDevice+RawDevice.h"
#import "UIImage+OldImage.h"
#import "ArmourHeapConfig.h"


@implementation SeekFourWaterViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = AreStateWon.koreanMagnesiumTransientVowelSlowEpsilon ? [UIColor grantingHomeLowClickedDogCellphone:AreStateWon.koreanMagnesiumTransientVowelSlowEpsilon]:UIColor.whiteColor;

    self.allowLowPen = self.lawBoldSeed;
    [IdiomFitView sawPicker];
    

    self.lenientMile.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.lenientMile mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(wrongUseEnds) name:AreStateWon.twoHoverHard.didNowInlandMayUseJapanese object:nil];
}

- (void)wrongUseEnds {
    [self.lenientMile reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([AreStateWon prematureFutureDispensePrepareSummaryName] && ArmourHeapConfig.shared.hueBypassedBoldfaceTradEmpty.stoneSigner.maleGeneral) {
        [IdiomFitView reduction];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)sockReceiverSize {
    UIWindow *triggerWindow = [[LocationsManager shared] hasPeakThickWindow];
    UIEdgeInsets safe = triggerWindow.safeAreaInsets;
    CGFloat daysTipUseTag = 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 starting] || [UIDevice tooRet]) {//无刘海
            daysTipUseTag = UIScreen.mainScreen.bounds.size.height*AreStateWon.capMindScalarHumidityPut;
        }else {
            daysTipUseTag = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*AreStateWon.capMindScalarHumidityPut;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, daysTipUseTag);
        
    }else { 
        if (![UIDevice starting] || [UIDevice tooRet]) {//无刘海
            daysTipUseTag = UIScreen.mainScreen.bounds.size.width * AreStateWon.capMindScalarHumidityPut;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                daysTipUseTag = (UIScreen.mainScreen.bounds.size.width - safe.left) * AreStateWon.capMindScalarHumidityPut;
            }else {
                daysTipUseTag = (UIScreen.mainScreen.bounds.size.width - safe.right) * AreStateWon.capMindScalarHumidityPut;
            }
        }
        return CGSizeMake(daysTipUseTag, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)faeroeseGesturesHasOxygenExcluded {
    UIWindow *triggerWindow = [[LocationsManager shared] hasPeakThickWindow];
    UIEdgeInsets safe = triggerWindow.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.sockReceiverSize);
        }];
    }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.sockReceiverSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.sockReceiverSize);
            }];
        }
    }
}

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

@end
