






#import "OurMoreViewController.h"

@interface OurMoreViewController ()

@end

@implementation OurMoreViewController

- (UIButton *)justifiedButton
{
    if (!_justifiedButton) {
        _justifiedButton = [[UIButton alloc] init];
        [_justifiedButton setTitle:BigAddition.noiseFactMen.gatewaysLatencyNibblesUnsignedLowJump forState:UIControlStateNormal];
        [_justifiedButton setTitleColor:[BigAddition zoneBlockColor] forState:UIControlStateNormal];
        [_justifiedButton addTarget:self action:@selector(clickBatchLawMicroDisallowAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _justifiedButton;
}

- (UIButton *)impactZoneButton
{
    if (!_impactZoneButton) {
        _impactZoneButton = [[UIButton alloc] init];
        [_impactZoneButton setTitle:BigAddition.noiseFactMen.idleKeepTemplateIntentsMonthFind forState:UIControlStateNormal];
        [_impactZoneButton setTitleColor:[BigAddition zoneBlockColor] forState:UIControlStateNormal];
        [_impactZoneButton addTarget:self action:@selector(homeOccurUpdateInputSlantAction:) forControlEvents:UIControlEventTouchUpInside];
        _impactZoneButton.hidden = [BigAddition connectedOldAdvisoryFiberArrayFinal];
    }
    return _impactZoneButton;
}

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

- (void)homeOccurUpdateInputSlantAction:(UIButton *)sender {
    [[ThickFlagManager shared] fitSystemEndWindow];
    [BigAddition homeOccurUpdateInputSlantAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [BigAddition spaLayerPinFireConcludeColor];
    [self.view addSubview:self.justifiedButton];
    [self.view addSubview:self.impactZoneButton];
    
    CGFloat manSize = BigAddition.noiseFactMen.farsiInfoZip;
    [_justifiedButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(BigAddition.noiseFactMen.tempRetMenu);
        make.size.mas_equalTo(CGSizeMake(manSize, manSize));
    }];
    [_impactZoneButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(BigAddition.noiseFactMen.tempRetMenu);
        make.right.equalTo(self.view).offset(-BigAddition.noiseFactMen.tempRetMenu);
        make.size.mas_equalTo(CGSizeMake(manSize, manSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(usagePrematurePotentialFeedbackShortNumberFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(bitsIodineClampedDebuggerContentHint:) 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([BigAddition guideExemplarDeliveryBagFoggyDeriveSize]);
    }];
}


- (void)usagePrematurePotentialFeedbackShortNumberFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect seeEventFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [ThickFlagManager shared].samplerAdobeWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(BigAddition.noiseFactMen.unsignedHyphensPiecePlugSecondsWill)]) {
#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 endRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((endRect.origin.y + endRect.size.height) > seeEventFrame.origin.y) {
                CGFloat trash = ((endRect.origin.y + endRect.size.height) - seeEventFrame.origin.y) + 10;
                
                mustYet(self);
                [UIView animateWithDuration:duration animations:^{
                    birthPipe(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -trash);
                }];
            }
        }
    }
}


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

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

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