






#import "OutdoorViewController.h"
#import "UIImageView+WebCache.h"

@interface OutdoorViewController ()

@end

@implementation OutdoorViewController

- (UIButton *)bevelTapsButton
{
    if (!_bevelTapsButton) {
        _bevelTapsButton = [[UIButton alloc] init];
        [_bevelTapsButton setTitle:BestSharpen.didNapCoptic.duplicateEnablingScrollsEstonianMathAdopt forState:UIControlStateNormal];
        [_bevelTapsButton setTitleColor:[BestSharpen makeSpaceColor] forState:UIControlStateNormal];
        [_bevelTapsButton addTarget:self action:@selector(delayedChangeIcelandicCivilThumbnailAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _bevelTapsButton;
}

- (UIButton *)voiceClockButton
{
    if (!_voiceClockButton) {
        _voiceClockButton = [[UIButton alloc] init];
        [_voiceClockButton setTitle:BestSharpen.didNapCoptic.reportingAndArmCharAgreementFull forState:UIControlStateNormal];
        [_voiceClockButton setTitleColor:[BestSharpen makeSpaceColor] forState:UIControlStateNormal];
        [_voiceClockButton addTarget:self action:@selector(unlockPaperWasFeedbackPlatformAction:) forControlEvents:UIControlEventTouchUpInside];
        _voiceClockButton.hidden = [BestSharpen distanceConstructMinimumOrganizeInverseSpeech];
    }
    return _voiceClockButton;
}

- (void)delayedChangeIcelandicCivilThumbnailAction:(UIButton *)sender {
    if(self.navigationController.viewControllers.count > 1) {
        [self.view endEditing:YES];
        [self.navigationController popViewControllerAnimated:NO];
    }else {
        [self unlockPaperWasFeedbackPlatformAction:sender];
        [self dismissViewControllerAnimated:NO completion:nil];
    }
}

- (void)unlockPaperWasFeedbackPlatformAction:(UIButton *)sender {
    [[ResetCurlManager shared] milesLogRedoWindow];
    [BestSharpen unlockPaperWasFeedbackPlatformAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = BestSharpen.didNapCoptic.obscuredSame;

    
    self.view.backgroundColor = [BestSharpen maxIndicatedPrefixedSmallerQueryColor];
    NSString *bezelPlatformInsideAcceptingAttitude = [BestSharpen improperHeartLongitudeCaffeineInvalidImage];
    if (bezelPlatformInsideAcceptingAttitude) {
        UIImageView *stopSearchImageView = [[UIImageView alloc] init];
        stopSearchImageView.contentMode = UIViewContentModeScaleAspectFill;
        stopSearchImageView.clipsToBounds = YES;
        stopSearchImageView.layer.cornerRadius = BestSharpen.didNapCoptic.obscuredSame;
        stopSearchImageView.layer.masksToBounds = YES;
        [stopSearchImageView sd_setImageWithURL:[NSURL URLWithString:bezelPlatformInsideAcceptingAttitude]];
        [self.view insertSubview:stopSearchImageView atIndex:0];
        [stopSearchImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.bulgarianThumbBarriersLighterEdgaImageView = stopSearchImageView;
    }

    [self.view addSubview:self.bevelTapsButton];
    [self.view addSubview:self.voiceClockButton];
    
    CGFloat retSize = BestSharpen.didNapCoptic.breakSobKeys;
    [_bevelTapsButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(BestSharpen.didNapCoptic.eggPanGuide);
        make.size.mas_equalTo(CGSizeMake(retSize, retSize));
    }];
    [_voiceClockButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(BestSharpen.didNapCoptic.eggPanGuide);
        make.right.equalTo(self.view).offset(-BestSharpen.didNapCoptic.eggPanGuide);
        make.size.mas_equalTo(CGSizeMake(retSize, retSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(rankedMantissaEraExpectingGeneralMaximumFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(millibarsRecordFlightCubeRowsNumerator:) name:UIKeyboardWillHideNotification object:nil];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo([BestSharpen overlayScriptEraAffectingSucceededTailSize]);
    }];
}


- (void)rankedMantissaEraExpectingGeneralMaximumFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect otherMixFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [ResetCurlManager shared].sumWorkTitleWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(BestSharpen.didNapCoptic.dayLanguageResetCanceledChargingTool)]) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        UIView *firstResponder = [keyWindow performSelector:@selector(firstResponder)];
#pragma clang diagnostic pop
        
        if (firstResponder  && [firstResponder isKindOfClass:UITextField.class]) {

            CGRect useRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((useRect.origin.y + useRect.size.height) > otherMixFrame.origin.y) {
                CGFloat touch = ((useRect.origin.y + useRect.size.height) - otherMixFrame.origin.y) + 10;
                
                idleToo(self);
                [UIView animateWithDuration:duration animations:^{
                    bigCursor(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -touch);
                }];
            }
        }
    }
}


- (void)millibarsRecordFlightCubeRowsNumerator:(NSNotification *)notification{
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    idleToo(self);
    [UIView animateWithDuration:duration animations:^{
        bigCursor(self);
        self.navigationController.view.transform = CGAffineTransformIdentity;
    }];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [super touchesEnded:touches withEvent:event];
    [self.view endEditing:YES];
}

- (void)resourcesTaskAdvisedFeatFind:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [self.view endEditing:YES];
}

- (void)dealloc {
    
    [self.view endEditing:YES];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];
}

@end
