






#import "FaxBuddyShiftViewController.h"
#import "ParentKitManager.h"
#import "MarkSameView.h"
#import "UIColor+SumColor.h"
#import "UIDevice+SonDevice.h"
#import "UIImage+SpaImage.h"
#import "WasPutBitsConfig.h"


@implementation FaxBuddyShiftViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = EventPinWho.decodingEncipherSheClientsTexturedPhase ? [UIColor subsetTeethFlipMidUsageAlong:EventPinWho.decodingEncipherSheClientsTexturedPhase]:UIColor.whiteColor;

    self.siblingsWax = self.roundTooMap;
    [MarkSameView lastSpace];
    

    self.timeWarning.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.timeWarning mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(carrierAbout) name:EventPinWho.animatingYet.armenianExporterDecayAxesSwedishYet object:nil];
}

- (void)carrierAbout {
    [self.timeWarning reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([EventPinWho unlockedDynamicUserPromotionKernelsName] && WasPutBitsConfig.shared.tryTeaspoonsFathomsCursiveWaiting.panelGetNap.useBadAcute) {
        [MarkSameView menResign];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)startupLargeSize {
    UIWindow *showingWindow = [[ParentKitManager shared] distortedAskWindow];
    UIEdgeInsets safe = showingWindow.safeAreaInsets;
    CGFloat mealGreatWire = 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 saveSwap] || [UIDevice redFun]) {//无刘海
            mealGreatWire = UIScreen.mainScreen.bounds.size.height*EventPinWho.marginsBookmarkAnimatorTiedException;
        }else {
            mealGreatWire = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*EventPinWho.marginsBookmarkAnimatorTiedException;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, mealGreatWire);
        
    }else { 
        if (![UIDevice saveSwap] || [UIDevice redFun]) {//无刘海
            mealGreatWire = UIScreen.mainScreen.bounds.size.width * EventPinWho.marginsBookmarkAnimatorTiedException;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                mealGreatWire = (UIScreen.mainScreen.bounds.size.width - safe.left) * EventPinWho.marginsBookmarkAnimatorTiedException;
            }else {
                mealGreatWire = (UIScreen.mainScreen.bounds.size.width - safe.right) * EventPinWho.marginsBookmarkAnimatorTiedException;
            }
        }
        return CGSizeMake(mealGreatWire, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)sceneFlatSideFurlongsDays {
    UIWindow *showingWindow = [[ParentKitManager shared] distortedAskWindow];
    UIEdgeInsets safe = showingWindow.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.startupLargeSize);
        }];
    }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.startupLargeSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.startupLargeSize);
            }];
        }
    }
}

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

@end
