






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

@interface DisplayViewController ()

@end

@implementation DisplayViewController

- (UIButton *)negotiateButton
{
    if (!_negotiateButton) {
        _negotiateButton = [[UIButton alloc] init];
        [_negotiateButton setTitle:LambdaPatch.faxChildBend.alphaOutBoundingMediumSessionPair forState:UIControlStateNormal];
        [_negotiateButton setTitleColor:[LambdaPatch sinMethodColor] forState:UIControlStateNormal];
        [_negotiateButton addTarget:self action:@selector(fractionsChainContactsInventoryRunningAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _negotiateButton;
}

- (UIButton *)visualPintButton
{
    if (!_visualPintButton) {
        _visualPintButton = [[UIButton alloc] init];
        [_visualPintButton setTitle:LambdaPatch.faxChildBend.arteryModeClearedRareJustifiedLandmark forState:UIControlStateNormal];
        [_visualPintButton setTitleColor:[LambdaPatch sinMethodColor] forState:UIControlStateNormal];
        [_visualPintButton addTarget:self action:@selector(chromaYoungestFarMediumFullyAction:) forControlEvents:UIControlEventTouchUpInside];
        _visualPintButton.hidden = [LambdaPatch barsMiddleSettlingBasqueUplinkCase];
    }
    return _visualPintButton;
}

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

- (void)chromaYoungestFarMediumFullyAction:(UIButton *)sender {
    [[FiberRaceManager shared] mountDustSubWindow];
    [LambdaPatch chromaYoungestFarMediumFullyAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = LambdaPatch.faxChildBend.likeBeganFit;

    
    self.view.backgroundColor = [LambdaPatch shelfMoleWalkingShadowLengthsColor];
    NSString *envelopeTriggersChannelMinPrecise = [LambdaPatch funModernMalayCheckedFutureImage];
    if (envelopeTriggersChannelMinPrecise) {
        UIImageView *maxEarWorkImageView = [[UIImageView alloc] init];
        maxEarWorkImageView.contentMode = UIViewContentModeScaleAspectFill;
        maxEarWorkImageView.clipsToBounds = YES;
        maxEarWorkImageView.layer.cornerRadius = LambdaPatch.faxChildBend.likeBeganFit;
        maxEarWorkImageView.layer.masksToBounds = YES;
        [maxEarWorkImageView sd_setImageWithURL:[NSURL URLWithString:envelopeTriggersChannelMinPrecise]];
        [self.view insertSubview:maxEarWorkImageView atIndex:0];
        [maxEarWorkImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.farMemberStopTwoSpringImageView = maxEarWorkImageView;
    }

    [self.view addSubview:self.negotiateButton];
    [self.view addSubview:self.visualPintButton];
    
    CGFloat illSize = LambdaPatch.faxChildBend.formScoreKey;
    [_negotiateButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(LambdaPatch.faxChildBend.rowSawInfer);
        make.size.mas_equalTo(CGSizeMake(illSize, illSize));
    }];
    [_visualPintButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(LambdaPatch.faxChildBend.rowSawInfer);
        make.right.equalTo(self.view).offset(-LambdaPatch.faxChildBend.rowSawInfer);
        make.size.mas_equalTo(CGSizeMake(illSize, illSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(momentaryArrangedAwayWrappersTapsDiamondFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exposuresParsingMomentClampedSlashedVerbose:) 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([LambdaPatch getPubHourlyRecoveryUnknownLikeSize]);
    }];
}


- (void)momentaryArrangedAwayWrappersTapsDiamondFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect obscuredFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [FiberRaceManager shared].stripLibraryWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(LambdaPatch.faxChildBend.auditReceiverTipSpecifierJoinProvince)]) {
#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 rawRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((rawRect.origin.y + rawRect.size.height) > obscuredFrame.origin.y) {
                CGFloat elder = ((rawRect.origin.y + rawRect.size.height) - obscuredFrame.origin.y) + 10;
                
                seekJob(self);
                [UIView animateWithDuration:duration animations:^{
                    tiedMouse(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -elder);
                }];
            }
        }
    }
}


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

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

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