






#import "EncryptViewController.h"

@interface EncryptViewController ()

@end

@implementation EncryptViewController

- (UIButton *)flushTradButton
{
    if (!_flushTradButton) {
        _flushTradButton = [[UIButton alloc] init];
        [_flushTradButton setTitle:AlbumBoxSex.catalanHertz.committedCalorieChargeUighurChapterBurmese forState:UIControlStateNormal];
        [_flushTradButton setTitleColor:[AlbumBoxSex eggBiotinColor] forState:UIControlStateNormal];
        [_flushTradButton addTarget:self action:@selector(quitWhileConstantsWaxHeartAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _flushTradButton;
}

- (UIButton *)opaqueHalfButton
{
    if (!_opaqueHalfButton) {
        _opaqueHalfButton = [[UIButton alloc] init];
        [_opaqueHalfButton setTitle:AlbumBoxSex.catalanHertz.ignoredMenuArtsForkJapaneseRotor forState:UIControlStateNormal];
        [_opaqueHalfButton setTitleColor:[AlbumBoxSex eggBiotinColor] forState:UIControlStateNormal];
        [_opaqueHalfButton addTarget:self action:@selector(topMainUpdatingGarbageDecipherAction:) forControlEvents:UIControlEventTouchUpInside];
        _opaqueHalfButton.hidden = [AlbumBoxSex descendSentencesMeasuredPrefixSegmentedUnbound];
    }
    return _opaqueHalfButton;
}

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

- (void)topMainUpdatingGarbageDecipherAction:(UIButton *)sender {
    [[PredicateManager shared] pongDutchCutWindow];
    [AlbumBoxSex topMainUpdatingGarbageDecipherAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [AlbumBoxSex phoneRevokedRunCleanHerColor];
    [self.view addSubview:self.flushTradButton];
    [self.view addSubview:self.opaqueHalfButton];
    
    CGFloat pinSize = AlbumBoxSex.catalanHertz.resetSpaLast;
    [_flushTradButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(AlbumBoxSex.catalanHertz.hitProduces);
        make.size.mas_equalTo(CGSizeMake(pinSize, pinSize));
    }];
    [_opaqueHalfButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(AlbumBoxSex.catalanHertz.hitProduces);
        make.right.equalTo(self.view).offset(-AlbumBoxSex.catalanHertz.hitProduces);
        make.size.mas_equalTo(CGSizeMake(pinSize, pinSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(spokenExhaustedSettlingExpectedBirthdayColoredFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(revealedPubGracefulZeroBridgeArts:) 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([AlbumBoxSex martialLibrariesDismissalCocoaHairDefineSize]);
    }];
}


- (void)spokenExhaustedSettlingExpectedBirthdayColoredFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect teethCarFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [PredicateManager shared].companyLeakyWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(AlbumBoxSex.catalanHertz.motionSerializeIncreaseTotalOldReuse)]) {
#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 oneRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((oneRect.origin.y + oneRect.size.height) > teethCarFrame.origin.y) {
                CGFloat pager = ((oneRect.origin.y + oneRect.size.height) - teethCarFrame.origin.y) + 10;
                
                visited(self);
                [UIView animateWithDuration:duration animations:^{
                    bitsLeast(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -pager);
                }];
            }
        }
    }
}


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

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

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