






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

@interface YetPlusViewController ()

@end

@implementation YetPlusViewController

- (UIButton *)reuseCallButton
{
    if (!_reuseCallButton) {
        _reuseCallButton = [[UIButton alloc] init];
        [_reuseCallButton setTitle:SchemesSong.targetRemote.elementExecStationKitSimpleHelp forState:UIControlStateNormal];
        [_reuseCallButton setTitleColor:[SchemesSong packShearColor] forState:UIControlStateNormal];
        [_reuseCallButton addTarget:self action:@selector(warpCaloriesCupAmbiguousSymbolicAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _reuseCallButton;
}

- (UIButton *)throughRowButton
{
    if (!_throughRowButton) {
        _throughRowButton = [[UIButton alloc] init];
        [_throughRowButton setTitle:SchemesSong.targetRemote.eachJustifiedWorkspaceFunItsOpen forState:UIControlStateNormal];
        [_throughRowButton setTitleColor:[SchemesSong packShearColor] forState:UIControlStateNormal];
        [_throughRowButton addTarget:self action:@selector(surrogateFemaleOutputSayRefusedAction:) forControlEvents:UIControlEventTouchUpInside];
        _throughRowButton.hidden = [SchemesSong indentBookmarkDescribesBlendCurveTab];
    }
    return _throughRowButton;
}

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

- (void)surrogateFemaleOutputSayRefusedAction:(UIButton *)sender {
    [[JobDegreeManager shared] gracefulBendWindow];
    [SchemesSong surrogateFemaleOutputSayRefusedAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = SchemesSong.targetRemote.primeAdapter;

    
    self.view.backgroundColor = [SchemesSong pubNauticalModeCarWrapColor];
    NSString *dismissalQueryRecoveryMakeClients = [SchemesSong brushBrownSentenceAliveRedoImage];
    if (dismissalQueryRecoveryMakeClients) {
        UIImageView *netAmbientImageView = [[UIImageView alloc] init];
        netAmbientImageView.contentMode = UIViewContentModeScaleAspectFill;
        netAmbientImageView.clipsToBounds = YES;
        netAmbientImageView.layer.cornerRadius = SchemesSong.targetRemote.primeAdapter;
        netAmbientImageView.layer.masksToBounds = YES;
        [netAmbientImageView sd_setImageWithURL:[NSURL URLWithString:dismissalQueryRecoveryMakeClients]];
        [self.view insertSubview:netAmbientImageView atIndex:0];
        [netAmbientImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.paperDrumMinBestUtteranceImageView = netAmbientImageView;
    }

    [self.view addSubview:self.reuseCallButton];
    [self.view addSubview:self.throughRowButton];
    
    CGFloat sumSize = SchemesSong.targetRemote.hasHostQuote;
    [_reuseCallButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(SchemesSong.targetRemote.areOutQuiet);
        make.size.mas_equalTo(CGSizeMake(sumSize, sumSize));
    }];
    [_throughRowButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(SchemesSong.targetRemote.areOutQuiet);
        make.right.equalTo(self.view).offset(-SchemesSong.targetRemote.areOutQuiet);
        make.size.mas_equalTo(CGSizeMake(sumSize, sumSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(performedCancelingStorePrettyClaimScannedFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(renewingConnectedStringCommandLocalizedSafety:) 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([SchemesSong tradCellphoneFirstArtsAgeMountSize]);
    }];
}


- (void)performedCancelingStorePrettyClaimScannedFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect gradeSayFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [JobDegreeManager shared].wasDraftSockWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(SchemesSong.targetRemote.unionMillCapableLoadMayHover)]) {
#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 tabRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((tabRect.origin.y + tabRect.size.height) > gradeSayFrame.origin.y) {
                CGFloat plate = ((tabRect.origin.y + tabRect.size.height) - gradeSayFrame.origin.y) + 10;
                
                millMix(self);
                [UIView animateWithDuration:duration animations:^{
                    numberHex(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -plate);
                }];
            }
        }
    }
}


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

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

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