






#import "RingLowViewController.h"

@interface RingLowViewController ()

@end

@implementation RingLowViewController

- (UIButton *)countPeerButton
{
    if (!_countPeerButton) {
        _countPeerButton = [[UIButton alloc] init];
        [_countPeerButton setTitle:DenyQuarter.nowPinReport.protocolsEstablishFullySolidSeleniumDraw forState:UIControlStateNormal];
        [_countPeerButton setTitleColor:[DenyQuarter serializeColor] forState:UIControlStateNormal];
        [_countPeerButton addTarget:self action:@selector(additionQueryRelatedPointerMixAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _countPeerButton;
}

- (UIButton *)logTriggerButton
{
    if (!_logTriggerButton) {
        _logTriggerButton = [[UIButton alloc] init];
        [_logTriggerButton setTitle:DenyQuarter.nowPinReport.dropIntervalOwnerChildArrayInterlace forState:UIControlStateNormal];
        [_logTriggerButton setTitleColor:[DenyQuarter serializeColor] forState:UIControlStateNormal];
        [_logTriggerButton addTarget:self action:@selector(wonMountedOutletDuctilityHebrewAction:) forControlEvents:UIControlEventTouchUpInside];
        _logTriggerButton.hidden = [DenyQuarter offerVitalEndPunjabiClusterOther];
    }
    return _logTriggerButton;
}

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

- (void)wonMountedOutletDuctilityHebrewAction:(UIButton *)sender {
    [[AlwaysButManager shared] atomThemeTenWindow];
    [DenyQuarter wonMountedOutletDuctilityHebrewAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [DenyQuarter curlRaceSecurityMaxTheColor];
    [self.view addSubview:self.countPeerButton];
    [self.view addSubview:self.logTriggerButton];
    
    CGFloat seeSize = DenyQuarter.nowPinReport.metabolicHis;
    [_countPeerButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(DenyQuarter.nowPinReport.sigmaUnique);
        make.size.mas_equalTo(CGSizeMake(seeSize, seeSize));
    }];
    [_logTriggerButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(DenyQuarter.nowPinReport.sigmaUnique);
        make.right.equalTo(self.view).offset(-DenyQuarter.nowPinReport.sigmaUnique);
        make.size.mas_equalTo(CGSizeMake(seeSize, seeSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(draftTelephotoHourTargetAdvisedEraFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(limitedForNoneWalkingAssistiveWatery:) 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([DenyQuarter waxGaspOneAppearingAccuracyDiscountsSize]);
    }];
}


- (void)draftTelephotoHourTargetAdvisedEraFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect beganEarFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [AlwaysButManager shared].relayHelpersWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(DenyQuarter.nowPinReport.acceptingOperateRowNumbersGenericMajor)]) {
#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 kitRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((kitRect.origin.y + kitRect.size.height) > beganEarFrame.origin.y) {
                CGFloat stake = ((kitRect.origin.y + kitRect.size.height) - beganEarFrame.origin.y) + 10;
                
                pingFar(self);
                [UIView animateWithDuration:duration animations:^{
                    penFactor(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -stake);
                }];
            }
        }
    }
}


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

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

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