






#import "DepthStrategyViewController.h"
#import "DigitSongManager.h"
#import "LiterAreView.h"
#import "UIColor+GetColor.h"
#import "UIDevice+TabDevice.h"
#import "UIImage+SumImage.h"
#import "FitAzimuthConfig.h"


@implementation DepthStrategyViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = ZipRestThat.sixInsteadExecutorUnwindingRegionsBoyfriend ? [UIColor nearbyZipBayerMonthLowDrum:ZipRestThat.sixInsteadExecutorUnwindingRegionsBoyfriend]:UIColor.whiteColor;

    self.busyEpsilon = self.groupedSink;
    [LiterAreView labelLike];
    

    self.supplyModel.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.supplyModel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(theScoreAtom) name:ZipRestThat.heartHowLead.criteriaEachDoubleIncludingYetAudience object:nil];
}

- (void)theScoreAtom {
    [self.supplyModel reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([ZipRestThat selectedIndicatedDetectsLookupCookiesName] && FitAzimuthConfig.shared.motionPauseVoiceScanAnchored.skipDisplay.rateButTurn) {
        [LiterAreView retExpose];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)plainFourOptSize {
    UIWindow *farFeatWindow = [[DigitSongManager shared] irregularHerWindow];
    UIEdgeInsets safe = farFeatWindow.safeAreaInsets;
    CGFloat didChinaLimit = 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 analysis] || [UIDevice askWax]) {//无刘海
            didChinaLimit = UIScreen.mainScreen.bounds.size.height*ZipRestThat.quitStreamEditorialDeclinedGraphics;
        }else {
            didChinaLimit = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*ZipRestThat.quitStreamEditorialDeclinedGraphics;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, didChinaLimit);
        
    }else { 
        if (![UIDevice analysis] || [UIDevice askWax]) {//无刘海
            didChinaLimit = UIScreen.mainScreen.bounds.size.width * ZipRestThat.quitStreamEditorialDeclinedGraphics;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                didChinaLimit = (UIScreen.mainScreen.bounds.size.width - safe.left) * ZipRestThat.quitStreamEditorialDeclinedGraphics;
            }else {
                didChinaLimit = (UIScreen.mainScreen.bounds.size.width - safe.right) * ZipRestThat.quitStreamEditorialDeclinedGraphics;
            }
        }
        return CGSizeMake(didChinaLimit, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)airSpaGrowNarrativeUptime {
    UIWindow *farFeatWindow = [[DigitSongManager shared] irregularHerWindow];
    UIEdgeInsets safe = farFeatWindow.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.plainFourOptSize);
        }];
    }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.plainFourOptSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.plainFourOptSize);
            }];
        }
    }
}

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

@end
