






#import "PortCarViewController.h"

@interface PortCarViewController ()

@end

@implementation PortCarViewController

- (UIButton *)lowerBeenButton
{
    if (!_lowerBeenButton) {
        _lowerBeenButton = [[UIButton alloc] init];
        [_lowerBeenButton setTitle:RaceRateYou.wristBoldNot.conflictsImmutableAssignOwnStrategyFunctions forState:UIControlStateNormal];
        [_lowerBeenButton setTitleColor:[RaceRateYou maleStripColor] forState:UIControlStateNormal];
        [_lowerBeenButton addTarget:self action:@selector(wristBordersWasPreviewsScopeAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _lowerBeenButton;
}

- (UIButton *)veryCarMapButton
{
    if (!_veryCarMapButton) {
        _veryCarMapButton = [[UIButton alloc] init];
        [_veryCarMapButton setTitle:RaceRateYou.wristBoldNot.warnExponentPencilMoleTabMutation forState:UIControlStateNormal];
        [_veryCarMapButton setTitleColor:[RaceRateYou maleStripColor] forState:UIControlStateNormal];
        [_veryCarMapButton addTarget:self action:@selector(alongsideBlendKirghizResponderNetworkAction:) forControlEvents:UIControlEventTouchUpInside];
        _veryCarMapButton.hidden = [RaceRateYou expireSimpleSunApplyingSinDispatch];
    }
    return _veryCarMapButton;
}

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

- (void)alongsideBlendKirghizResponderNetworkAction:(UIButton *)sender {
    [[SeparatedManager shared] sessionRenewWindow];
    [RaceRateYou alongsideBlendKirghizResponderNetworkAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [RaceRateYou keyboardCycleRestingFullyLighterColor];
    [self.view addSubview:self.lowerBeenButton];
    [self.view addSubview:self.veryCarMapButton];
    
    CGFloat itsSize = RaceRateYou.wristBoldNot.charAlbumOur;
    [_lowerBeenButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(RaceRateYou.wristBoldNot.angularLoad);
        make.size.mas_equalTo(CGSizeMake(itsSize, itsSize));
    }];
    [_veryCarMapButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(RaceRateYou.wristBoldNot.angularLoad);
        make.right.equalTo(self.view).offset(-RaceRateYou.wristBoldNot.angularLoad);
        make.size.mas_equalTo(CGSizeMake(itsSize, itsSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(fusionRaiseStatementSynthesisReferenceSoftballFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(frameLocalWatchedCombineExceptionQuechua:) 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([RaceRateYou localityMarkupIntroCloudySnowWhileSize]);
    }];
}


- (void)fusionRaiseStatementSynthesisReferenceSoftballFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect loosePanFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [SeparatedManager shared].nordicBecomeWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(RaceRateYou.wristBoldNot.canKeysEjectHexSamplingNet)]) {
#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 askRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((askRect.origin.y + askRect.size.height) > loosePanFrame.origin.y) {
                CGFloat joule = ((askRect.origin.y + askRect.size.height) - loosePanFrame.origin.y) + 10;
                
                swahili(self);
                [UIView animateWithDuration:duration animations:^{
                    linerNote(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -joule);
                }];
            }
        }
    }
}


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

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

- (void)methodReleaseFootersBreakingOut:(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
