






#import "ZeroSubViewController.h"
#import "UIImageView+WebCache.h"

@interface ZeroSubViewController ()

@end

@implementation ZeroSubViewController

- (UIButton *)retRetainButton
{
    if (!_retRetainButton) {
        _retRetainButton = [[UIButton alloc] init];
        [_retRetainButton setTitle:TooCloudSun.seeFocusSlab.trapDetachChangingCityIntroWorkspace forState:UIControlStateNormal];
        [_retRetainButton setTitleColor:[TooCloudSun ouncesPopColor] forState:UIControlStateNormal];
        [_retRetainButton addTarget:self action:@selector(pipeUpperSortingLifetimeTransposeAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _retRetainButton;
}

- (UIButton *)sendPinUseButton
{
    if (!_sendPinUseButton) {
        _sendPinUseButton = [[UIButton alloc] init];
        [_sendPinUseButton setTitle:TooCloudSun.seeFocusSlab.anyAccountAttempterBirthSoccerSlashed forState:UIControlStateNormal];
        [_sendPinUseButton setTitleColor:[TooCloudSun ouncesPopColor] forState:UIControlStateNormal];
        [_sendPinUseButton addTarget:self action:@selector(windowOvulationThatBeganFiveAction:) forControlEvents:UIControlEventTouchUpInside];
        _sendPinUseButton.hidden = [TooCloudSun caretRestoreFinalizeTowerSmallerRest];
    }
    return _sendPinUseButton;
}

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

- (void)windowOvulationThatBeganFiveAction:(UIButton *)sender {
    [[DocumentsManager shared] belowOffHostWindow];
    [TooCloudSun windowOvulationThatBeganFiveAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = TooCloudSun.seeFocusSlab.busBitsDaily;

    
    self.view.backgroundColor = [TooCloudSun zipBloodDrainDisplayedBaselinesColor];
    NSString *sleepWeightsTagalogServicesSubfamily = [TooCloudSun fairSolidRadiansMoodCatalystImage];
    if (sleepWeightsTagalogServicesSubfamily) {
        UIImageView *bitMenPushImageView = [[UIImageView alloc] init];
        bitMenPushImageView.contentMode = UIViewContentModeScaleAspectFill;
        bitMenPushImageView.clipsToBounds = YES;
        bitMenPushImageView.layer.cornerRadius = TooCloudSun.seeFocusSlab.busBitsDaily;
        bitMenPushImageView.layer.masksToBounds = YES;
        [bitMenPushImageView sd_setImageWithURL:[NSURL URLWithString:sleepWeightsTagalogServicesSubfamily]];
        [self.view insertSubview:bitMenPushImageView atIndex:0];
        [bitMenPushImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.artGreatCutSpeakerUniversalImageView = bitMenPushImageView;
    }

    [self.view addSubview:self.retRetainButton];
    [self.view addSubview:self.sendPinUseButton];
    
    CGFloat ownSize = TooCloudSun.seeFocusSlab.valuePingCap;
    [_retRetainButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(TooCloudSun.seeFocusSlab.tagsRefresh);
        make.size.mas_equalTo(CGSizeMake(ownSize, ownSize));
    }];
    [_sendPinUseButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(TooCloudSun.seeFocusSlab.tagsRefresh);
        make.right.equalTo(self.view).offset(-TooCloudSun.seeFocusSlab.tagsRefresh);
        make.size.mas_equalTo(CGSizeMake(ownSize, ownSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(stripStorylineInterCountedPublicDriveFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(unboundWarnBurnMovieDevicesChanging:) 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([TooCloudSun feetDeviationVerticalAttachedHisFurlongsSize]);
    }];
}


- (void)stripStorylineInterCountedPublicDriveFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect adoptTwoFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [DocumentsManager shared].errorClearedWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(TooCloudSun.seeFocusSlab.safeComposerPrivilegeSubtractRunningBefore)]) {
#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 didRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((didRect.origin.y + didRect.size.height) > adoptTwoFrame.origin.y) {
                CGFloat exits = ((didRect.origin.y + didRect.size.height) - adoptTwoFrame.origin.y) + 10;
                
                redoLow(self);
                [UIView animateWithDuration:duration animations:^{
                    methodSum(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -exits);
                }];
            }
        }
    }
}


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

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

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