






#import "MoleSubViewController.h"

@interface MoleSubViewController ()

@end

@implementation MoleSubViewController

- (UIButton *)formatIllButton
{
    if (!_formatIllButton) {
        _formatIllButton = [[UIButton alloc] init];
        [_formatIllButton setTitle:TopMergeNap.yetChromaUse.slopeNoiseChromiumScrollMetalFixture forState:UIControlStateNormal];
        [_formatIllButton setTitleColor:[TopMergeNap wasClientColor] forState:UIControlStateNormal];
        [_formatIllButton addTarget:self action:@selector(kinEngineerSerializeSingleResizeAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _formatIllButton;
}

- (UIButton *)waistAfterButton
{
    if (!_waistAfterButton) {
        _waistAfterButton = [[UIButton alloc] init];
        [_waistAfterButton setTitle:TopMergeNap.yetChromaUse.higherCircularSolidCutLineBookmarks forState:UIControlStateNormal];
        [_waistAfterButton setTitleColor:[TopMergeNap wasClientColor] forState:UIControlStateNormal];
        [_waistAfterButton addTarget:self action:@selector(fontArtworkPackMixerMovementAction:) forControlEvents:UIControlEventTouchUpInside];
        _waistAfterButton.hidden = [TopMergeNap sequenceRestartOceanBayerTransferFloater];
    }
    return _waistAfterButton;
}

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

- (void)fontArtworkPackMixerMovementAction:(UIButton *)sender {
    [[ExtendingManager shared] caretPanAreaWindow];
    [TopMergeNap fontArtworkPackMixerMovementAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [TopMergeNap problemPhotosMillibarsRadiansLicenseColor];
    [self.view addSubview:self.formatIllButton];
    [self.view addSubview:self.waistAfterButton];
    
    CGFloat waxSize = TopMergeNap.yetChromaUse.routeCaption;
    [_formatIllButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(TopMergeNap.yetChromaUse.blurMapMale);
        make.size.mas_equalTo(CGSizeMake(waxSize, waxSize));
    }];
    [_waistAfterButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(TopMergeNap.yetChromaUse.blurMapMale);
        make.right.equalTo(self.view).offset(-TopMergeNap.yetChromaUse.blurMapMale);
        make.size.mas_equalTo(CGSizeMake(waxSize, waxSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(thiaminBitCollectorPresentOnceBypassFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(servicesBrokenVisionExecuteSobAnswer:) 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([TopMergeNap phoneticIndirectIntegersRevertingRestSubscriptSize]);
    }];
}


- (void)thiaminBitCollectorPresentOnceBypassFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect producerFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [ExtendingManager shared].startupBadgeWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(TopMergeNap.yetChromaUse.wakeFlashMetadataTouchesSettingPin)]) {
#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 armRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((armRect.origin.y + armRect.size.height) > producerFrame.origin.y) {
                CGFloat plain = ((armRect.origin.y + armRect.size.height) - producerFrame.origin.y) + 10;
                
                lostHis(self);
                [UIView animateWithDuration:duration animations:^{
                    bandMouth(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -plain);
                }];
            }
        }
    }
}


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

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

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