






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

@interface RankLowViewController ()

@end

@implementation RankLowViewController

- (UIButton *)blurRangeButton
{
    if (!_blurRangeButton) {
        _blurRangeButton = [[UIButton alloc] init];
        [_blurRangeButton setTitle:TextualTemp.cancelsParse.cutPenPrefersRectifiedUnfocusedPrefixed forState:UIControlStateNormal];
        [_blurRangeButton setTitleColor:[TextualTemp crossBeenColor] forState:UIControlStateNormal];
        [_blurRangeButton addTarget:self action:@selector(menOwnTopHeadsetWarnAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _blurRangeButton;
}

- (UIButton *)funkSphereButton
{
    if (!_funkSphereButton) {
        _funkSphereButton = [[UIButton alloc] init];
        [_funkSphereButton setTitle:TextualTemp.cancelsParse.notListenerArteryMonotonicPetabytesRussian forState:UIControlStateNormal];
        [_funkSphereButton setTitleColor:[TextualTemp crossBeenColor] forState:UIControlStateNormal];
        [_funkSphereButton addTarget:self action:@selector(optionalModifiersRowSleepSliceAction:) forControlEvents:UIControlEventTouchUpInside];
        _funkSphereButton.hidden = [TextualTemp veryBreakingYouBasicNinePut];
    }
    return _funkSphereButton;
}

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

- (void)optionalModifiersRowSleepSliceAction:(UIButton *)sender {
    [[WeekEulerManager shared] binPriorLongWindow];
    [TextualTemp optionalModifiersRowSleepSliceAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = TextualTemp.cancelsParse.burstNumeric;

    
    self.view.backgroundColor = [TextualTemp wetTransformArcadeAgeDrainColor];
    NSString *awakeInstallsTryRequiringEast = [TextualTemp themeListenersArabicSubgroupsEmailImage];
    if (awakeInstallsTryRequiringEast) {
        UIImageView *builtOfferImageView = [[UIImageView alloc] init];
        builtOfferImageView.contentMode = UIViewContentModeScaleAspectFill;
        builtOfferImageView.clipsToBounds = YES;
        builtOfferImageView.layer.cornerRadius = TextualTemp.cancelsParse.burstNumeric;
        builtOfferImageView.layer.masksToBounds = YES;
        [builtOfferImageView sd_setImageWithURL:[NSURL URLWithString:awakeInstallsTryRequiringEast]];
        [self.view insertSubview:builtOfferImageView atIndex:0];
        [builtOfferImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.retainedArmWelshCameraUnionImageView = builtOfferImageView;
    }

    [self.view addSubview:self.blurRangeButton];
    [self.view addSubview:self.funkSphereButton];
    
    CGFloat manSize = TextualTemp.cancelsParse.napSpaceOver;
    [_blurRangeButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(TextualTemp.cancelsParse.rowsSeedUse);
        make.size.mas_equalTo(CGSizeMake(manSize, manSize));
    }];
    [_funkSphereButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(TextualTemp.cancelsParse.rowsSeedUse);
        make.right.equalTo(self.view).offset(-TextualTemp.cancelsParse.rowsSeedUse);
        make.size.mas_equalTo(CGSizeMake(manSize, manSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(agreementLabelBulgarianSuddenCapLiterFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(slopeDownDepthNotCertSpine:) 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([TextualTemp footerIncreaseDismissDisposeSortingThemeSize]);
    }];
}


- (void)agreementLabelBulgarianSuddenCapLiterFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect showHighFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [WeekEulerManager shared].sonAssignOwnWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(TextualTemp.cancelsParse.custodianRemoveNowHiddenGesturesBitmap)]) {
#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 eggRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((eggRect.origin.y + eggRect.size.height) > showHighFrame.origin.y) {
                CGFloat joule = ((eggRect.origin.y + eggRect.size.height) - showHighFrame.origin.y) + 10;
                
                andLift(self);
                [UIView animateWithDuration:duration animations:^{
                    sexReveal(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -joule);
                }];
            }
        }
    }
}


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

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

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