






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

@interface CatShotBedViewController ()

@property (nonatomic, strong) UIView * cupDueView;
@property (nonatomic, strong) UIImageView * lowView;

@end

@implementation CatShotBedViewController

- (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.cupDueView = [UIView new];
    self.cupDueView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:self.cupDueView];
    
    self.lowView = [[UIImageView alloc] initWithImage:[UIImage redirectsDeveloperTemporalSameMotionName:InvertPinch.didThousands.howPickerTruncatesCinematicMoveCinematic]];;
    [self.view addSubview:self.lowView];
    
    [[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 {
    if ([UIDevice putIll]) {
        return CGSizeMake(InvertPinch.hockeyProjectStrictItsMouth, InvertPinch.hockeyProjectStrictItsMouth);
    }
    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) {
        if (![UIDevice dirtyOdd]) {
            return CGSizeMake(UIScreen.mainScreen.bounds.size.width, InvertPinch.hockeyProjectStrictItsMouth);
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, InvertPinch.hockeyProjectStrictItsMouth + safe.bottom);
    }else {
        if (![UIDevice dirtyOdd]) {
            return CGSizeMake(InvertPinch.hockeyProjectStrictItsMouth,UIScreen.mainScreen.bounds.size.height);
        }
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            return CGSizeMake(InvertPinch.hockeyProjectStrictItsMouth + safe.left,UIScreen.mainScreen.bounds.size.height);
        }else {
            return CGSizeMake(InvertPinch.hockeyProjectStrictItsMouth + 5,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) {
        
        if ([UIDevice putIll]) {
            self.cupDueView.layer.cornerRadius = 5.f;
            self.cupDueView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
        }
        [self.cupDueView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view.mas_top);
            make.left.right.equalTo(self.view);
            make.height.mas_equalTo(InvertPinch.didThousands.stereoPartly);
        }];
        [self.lowView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.cupDueView.mas_top);
            make.centerX.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(InvertPinch.didThousands.workStoneAny, InvertPinch.didThousands.digitDueYard));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.updateSafetySize);
        }];
        [self.eligibleCan mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.height.mas_equalTo(InvertPinch.hockeyProjectStrictItsMouth);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(0, self.updateSafetySize.height);
    }else {
        
        if ([UIDevice putIll]) {
            self.cupDueView.layer.cornerRadius = 5.f;
            self.cupDueView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
        }
        [self.cupDueView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.view.mas_right);
            make.top.bottom.equalTo(self.view);
            make.width.mas_equalTo(InvertPinch.didThousands.stereoPartly);
        }];
        UIImage *jumpKnowImage = [UIImage redirectsDeveloperTemporalSameMotionName:InvertPinch.didThousands.howPickerTruncatesCinematicMoveCinematic];
        UIImage *zipQuitImage = [UIImage imageWithCGImage:jumpKnowImage.CGImage
                                                    scale:jumpKnowImage.scale
                                              orientation:UIImageOrientationRight]; 
        self.lowView.image = zipQuitImage;
        [self.lowView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.cupDueView.mas_right);
            make.centerY.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(InvertPinch.didThousands.digitDueYard, InvertPinch.didThousands.workStoneAny));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(0);
            make.size.mas_equalTo(self.updateSafetySize);
        }];
        [self.eligibleCan mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.right.mas_equalTo(0);
            make.width.mas_equalTo(InvertPinch.hockeyProjectStrictItsMouth);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(-self.updateSafetySize.width, 0);
    }
    [UIView animateWithDuration:0.3 animations:^{
        self.view.transform = CGAffineTransformIdentity;
    }];
}

- (void)shiftBordersMarginGlyphMostly:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    itsBeen(self);
    [super shiftBordersMarginGlyphMostly:touches withEvent:event];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
#pragma clang diagnostic pop
    if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
        [UIView animateWithDuration:0.3 animations:^{
            weakself.view.transform = CGAffineTransformMakeTranslation(0, weakself.updateSafetySize.height);;
        } completion:^(BOOL finished) {
            [[UploadWhoManager shared] fastHueArteryDriveReversesCarriageViewController:self.navigationController];
        }];
    }else {
        [UIView animateWithDuration:0.3 animations:^{
            self.view.transform = CGAffineTransformMakeTranslation(-weakself.updateSafetySize.width, 0);
        } completion:^(BOOL finished) {
            [[UploadWhoManager shared] fastHueArteryDriveReversesCarriageViewController:weakself.navigationController];
        }];
    }
}

@end
