






#import "KinEachViewController.h"

@interface KinEachViewController ()

@end

@implementation KinEachViewController

- (UIButton *)useHebrewButton
{
    if (!_useHebrewButton) {
        _useHebrewButton = [[UIButton alloc] init];
        [_useHebrewButton setTitle:PlayDragTap.popHandshake.routerEarlierShortOrderedLookRomanian forState:UIControlStateNormal];
        [_useHebrewButton setTitleColor:[PlayDragTap trashLongColor] forState:UIControlStateNormal];
        [_useHebrewButton addTarget:self action:@selector(ornamentsGoalBinPaddleGlobalAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _useHebrewButton;
}

- (UIButton *)spaGlucoseButton
{
    if (!_spaGlucoseButton) {
        _spaGlucoseButton = [[UIButton alloc] init];
        [_spaGlucoseButton setTitle:PlayDragTap.popHandshake.manganeseCommonAvailSetupDefinesNotified forState:UIControlStateNormal];
        [_spaGlucoseButton setTitleColor:[PlayDragTap trashLongColor] forState:UIControlStateNormal];
        [_spaGlucoseButton addTarget:self action:@selector(speakerClickTrailingInsetIntersectAction:) forControlEvents:UIControlEventTouchUpInside];
        _spaGlucoseButton.hidden = [PlayDragTap ciphersRowAgentRaceStoodMath];
    }
    return _spaGlucoseButton;
}

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

- (void)speakerClickTrailingInsetIntersectAction:(UIButton *)sender {
    [[TagsFoggyManager shared] magentaStandWindow];
    [PlayDragTap speakerClickTrailingInsetIntersectAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [PlayDragTap popSinBrandAudiencesDaughterColor];
    [self.view addSubview:self.useHebrewButton];
    [self.view addSubview:self.spaGlucoseButton];
    
    CGFloat pubSize = PlayDragTap.popHandshake.tryMegahertz;
    [_useHebrewButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(PlayDragTap.popHandshake.hailTrusted);
        make.size.mas_equalTo(CGSizeMake(pubSize, pubSize));
    }];
    [_spaGlucoseButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(PlayDragTap.popHandshake.hailTrusted);
        make.right.equalTo(self.view).offset(-PlayDragTap.popHandshake.hailTrusted);
        make.size.mas_equalTo(CGSizeMake(pubSize, pubSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(waxDerivedVersionSignSolidFinishingFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(upsidePicturesMutationFurlongsStepperCompress:) 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([PlayDragTap slavicMagnesiumDetectorAvailArrayExpiredSize]);
    }];
}


- (void)waxDerivedVersionSignSolidFinishingFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect insetRawFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [TagsFoggyManager shared].armCorrectedWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(PlayDragTap.popHandshake.calorieExtentHusbandMotionOrdinalNow)]) {
#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 theRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((theRect.origin.y + theRect.size.height) > insetRawFrame.origin.y) {
                CGFloat cocoa = ((theRect.origin.y + theRect.size.height) - insetRawFrame.origin.y) + 10;
                
                maxMill(self);
                [UIView animateWithDuration:duration animations:^{
                    tokenFail(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -cocoa);
                }];
            }
        }
    }
}


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

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

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