






#import "LengthsViewController.h"

@interface LengthsViewController ()

@end

@implementation LengthsViewController

- (UIButton *)valueStopButton
{
    if (!_valueStopButton) {
        _valueStopButton = [[UIButton alloc] init];
        [_valueStopButton setTitle:HisTwoEject.mildVitalEar.scanOutsideDetectedUnorderedUnwindIcy forState:UIControlStateNormal];
        [_valueStopButton setTitleColor:[HisTwoEject secureWetColor] forState:UIControlStateNormal];
        [_valueStopButton addTarget:self action:@selector(identicalArabicMercuryAnswerMomentaryAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _valueStopButton;
}

- (UIButton *)optYouLinkButton
{
    if (!_optYouLinkButton) {
        _optYouLinkButton = [[UIButton alloc] init];
        [_optYouLinkButton setTitle:HisTwoEject.mildVitalEar.panHindiUpdateViabilitySerifApple forState:UIControlStateNormal];
        [_optYouLinkButton setTitleColor:[HisTwoEject secureWetColor] forState:UIControlStateNormal];
        [_optYouLinkButton addTarget:self action:@selector(extentRectumPromiseComposeClusterAction:) forControlEvents:UIControlEventTouchUpInside];
        _optYouLinkButton.hidden = [HisTwoEject funHertzRoomFoldCaloriesProvince];
    }
    return _optYouLinkButton;
}

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

- (void)extentRectumPromiseComposeClusterAction:(UIButton *)sender {
    [[VolumeAddManager shared] areAreAbsentWindow];
    [HisTwoEject extentRectumPromiseComposeClusterAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [HisTwoEject noneDisplayedCapablePolarToolColor];
    [self.view addSubview:self.valueStopButton];
    [self.view addSubview:self.optYouLinkButton];
    
    CGFloat forSize = HisTwoEject.mildVitalEar.mixDryPreset;
    [_valueStopButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(HisTwoEject.mildVitalEar.disablesDid);
        make.size.mas_equalTo(CGSizeMake(forSize, forSize));
    }];
    [_optYouLinkButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(HisTwoEject.mildVitalEar.disablesDid);
        make.right.equalTo(self.view).offset(-HisTwoEject.mildVitalEar.disablesDid);
        make.size.mas_equalTo(CGSizeMake(forSize, forSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(penDisposeMeteringBlurSingularYouFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(strictlyRadialDriveHowFadeStreamed:) 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([HisTwoEject downListenSocialPackageIntentDefaultSize]);
    }];
}


- (void)penDisposeMeteringBlurSingularYouFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect alphaMaxFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [VolumeAddManager shared].otherKeyOnceWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(HisTwoEject.mildVitalEar.variableMergeFilteringDeltaGlobalCell)]) {
#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 netRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((netRect.origin.y + netRect.size.height) > alphaMaxFrame.origin.y) {
                CGFloat farsi = ((netRect.origin.y + netRect.size.height) - alphaMaxFrame.origin.y) + 10;
                
                foodHow(self);
                [UIView animateWithDuration:duration animations:^{
                    manySurge(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -farsi);
                }];
            }
        }
    }
}


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

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

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