






#import "GramFrontHoldViewController.h"
#import "UploadWhoManager.h"
#import "TildeManView.h"
#import "UIColor+NotColor.h"
#import "UIDevice+RowDevice.h"
#import "UIImage+WayImage.h"
#import "SubmitWireConfig.h"


@implementation GramFrontHoldViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = InvertPinch.exposeReversedElevenParagraphClientsEscape ? [UIColor leaseSizeHormoneTwistMarathiTake:InvertPinch.exposeReversedElevenParagraphClientsEscape]:UIColor.whiteColor;

    self.offsetsText = self.ownAutoGolf;
    [TildeManView batchLove];
    

    self.eligibleCan.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.eligibleCan mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(noncePongMen) name:InvertPinch.didThousands.menIconAssumeItalianHairCapturing object:nil];
}

- (void)noncePongMen {
    [self.eligibleCan reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([InvertPinch gregorianItalicIncreaseSeekingSawName] && SubmitWireConfig.shared.putFailWayChinaHeadphone.hostStarKey.kinChunkThe) {
        [TildeManView romanDate];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)updateSafetySize {
    UIWindow *kinManyWindow = [[UploadWhoManager shared] roomSystolicWindow];
    UIEdgeInsets safe = kinManyWindow.safeAreaInsets;
    CGFloat homeUnionSalt = 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 dirtyOdd] || [UIDevice putIll]) {//无刘海
            homeUnionSalt = UIScreen.mainScreen.bounds.size.height*InvertPinch.howEncodeIssuerReferenceSee;
        }else {
            homeUnionSalt = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*InvertPinch.howEncodeIssuerReferenceSee;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, homeUnionSalt);
        
    }else { 
        if (![UIDevice dirtyOdd] || [UIDevice putIll]) {//无刘海
            homeUnionSalt = UIScreen.mainScreen.bounds.size.width * InvertPinch.howEncodeIssuerReferenceSee;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                homeUnionSalt = (UIScreen.mainScreen.bounds.size.width - safe.left) * InvertPinch.howEncodeIssuerReferenceSee;
            }else {
                homeUnionSalt = (UIScreen.mainScreen.bounds.size.width - safe.right) * InvertPinch.howEncodeIssuerReferenceSee;
            }
        }
        return CGSizeMake(homeUnionSalt, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)didTapConverterAmpereUnwinding {
    UIWindow *kinManyWindow = [[UploadWhoManager shared] roomSystolicWindow];
    UIEdgeInsets safe = kinManyWindow.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.updateSafetySize);
        }];
    }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.updateSafetySize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.updateSafetySize);
            }];
        }
    }
}

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

@end
