






#import "SpanishViewController.h"

@interface SpanishViewController ()

@end

@implementation SpanishViewController

- (UIButton *)cinematicButton
{
    if (!_cinematicButton) {
        _cinematicButton = [[UIButton alloc] init];
        [_cinematicButton setTitle:CloudyPrice.resetEndsIts.strongestExecCommentsRedoAssistiveWeekly forState:UIControlStateNormal];
        [_cinematicButton setTitleColor:[CloudyPrice foggyLazyColor] forState:UIControlStateNormal];
        [_cinematicButton addTarget:self action:@selector(genreDiscoveryDeriveCheckSoundAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _cinematicButton;
}

- (UIButton *)sonLockingButton
{
    if (!_sonLockingButton) {
        _sonLockingButton = [[UIButton alloc] init];
        [_sonLockingButton setTitle:CloudyPrice.resetEndsIts.rollbackHisSessionsHangReceiveSub forState:UIControlStateNormal];
        [_sonLockingButton setTitleColor:[CloudyPrice foggyLazyColor] forState:UIControlStateNormal];
        [_sonLockingButton addTarget:self action:@selector(wasOutStandardHandballTruncatedAction:) forControlEvents:UIControlEventTouchUpInside];
        _sonLockingButton.hidden = [CloudyPrice blindingLowercaseRouteMeanMegahertzResign];
    }
    return _sonLockingButton;
}

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

- (void)wasOutStandardHandballTruncatedAction:(UIButton *)sender {
    [[RingMiterManager shared] imperialLostWindow];
    [CloudyPrice wasOutStandardHandballTruncatedAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [CloudyPrice wrestlingAboveObsoleteArmourBigColor];
    [self.view addSubview:self.cinematicButton];
    [self.view addSubview:self.sonLockingButton];
    
    CGFloat askSize = CloudyPrice.resetEndsIts.tryCreateYou;
    [_cinematicButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(CloudyPrice.resetEndsIts.instantSign);
        make.size.mas_equalTo(CGSizeMake(askSize, askSize));
    }];
    [_sonLockingButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(CloudyPrice.resetEndsIts.instantSign);
        make.right.equalTo(self.view).offset(-CloudyPrice.resetEndsIts.instantSign);
        make.size.mas_equalTo(CGSizeMake(askSize, askSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(inviteProvidingKazakhSlopeShowAddFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(datumUnwrapTipSmallestSlashStrategy:) 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([CloudyPrice visitorResourceValidatesFlexibleNepaliInsertionSize]);
    }];
}


- (void)inviteProvidingKazakhSlopeShowAddFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect eggPasteFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [RingMiterManager shared].daughtersCutWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(CloudyPrice.resetEndsIts.occurredSemanticPlaybackGenderDirectionElastic)]) {
#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 tagRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((tagRect.origin.y + tagRect.size.height) > eggPasteFrame.origin.y) {
                CGFloat tower = ((tagRect.origin.y + tagRect.size.height) - eggPasteFrame.origin.y) + 10;
                
                mildDry(self);
                [UIView animateWithDuration:duration animations:^{
                    followCap(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -tower);
                }];
            }
        }
    }
}


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

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

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