






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

@interface DisableViewController ()

@end

@implementation DisableViewController

- (UIButton *)encodingsButton
{
    if (!_encodingsButton) {
        _encodingsButton = [[UIButton alloc] init];
        [_encodingsButton setTitle:RedFlexible.capContinued.signatureGreaterAloneBlinkHelloDetector forState:UIControlStateNormal];
        [_encodingsButton setTitleColor:[RedFlexible supportedColor] forState:UIControlStateNormal];
        [_encodingsButton addTarget:self action:@selector(deepScaleIdenticalRawPrematureAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _encodingsButton;
}

- (UIButton *)rowProjectButton
{
    if (!_rowProjectButton) {
        _rowProjectButton = [[UIButton alloc] init];
        [_rowProjectButton setTitle:RedFlexible.capContinued.segmentsUtteranceCancelingScrolledChromaPresenter forState:UIControlStateNormal];
        [_rowProjectButton setTitleColor:[RedFlexible supportedColor] forState:UIControlStateNormal];
        [_rowProjectButton addTarget:self action:@selector(notifyingResultsCatEarSquaredAction:) forControlEvents:UIControlEventTouchUpInside];
        _rowProjectButton.hidden = [RedFlexible hybridSemicolonConcludeTipAscendingHold];
    }
    return _rowProjectButton;
}

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

- (void)notifyingResultsCatEarSquaredAction:(UIButton *)sender {
    [[PerformerManager shared] threeEarWrapWindow];
    [RedFlexible notifyingResultsCatEarSquaredAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = RedFlexible.capContinued.pinchExtract;

    
    self.view.backgroundColor = [RedFlexible mixBlockMileFilmFrequencyColor];
    NSString *converterGracefulCosmicVitalAllow = [RedFlexible callbacksScrolledTakeButterflyGetImage];
    if (converterGracefulCosmicVitalAllow) {
        UIImageView *sawSerbianImageView = [[UIImageView alloc] init];
        sawSerbianImageView.contentMode = UIViewContentModeScaleAspectFill;
        sawSerbianImageView.clipsToBounds = YES;
        sawSerbianImageView.layer.cornerRadius = RedFlexible.capContinued.pinchExtract;
        sawSerbianImageView.layer.masksToBounds = YES;
        [sawSerbianImageView sd_setImageWithURL:[NSURL URLWithString:converterGracefulCosmicVitalAllow]];
        [self.view insertSubview:sawSerbianImageView atIndex:0];
        [sawSerbianImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.cardTouchIncludingCaretQuietImageView = sawSerbianImageView;
    }

    [self.view addSubview:self.encodingsButton];
    [self.view addSubview:self.rowProjectButton];
    
    CGFloat andSize = RedFlexible.capContinued.alarmNetLoud;
    [_encodingsButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(RedFlexible.capContinued.composeDone);
        make.size.mas_equalTo(CGSizeMake(andSize, andSize));
    }];
    [_rowProjectButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(RedFlexible.capContinued.composeDone);
        make.right.equalTo(self.view).offset(-RedFlexible.capContinued.composeDone);
        make.size.mas_equalTo(CGSizeMake(andSize, andSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(rearrangeTeethHerFullyKoreanButFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(spaEarParseClaimRearrangeFinish:) 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([RedFlexible borderSamplesBinRangingCookieContainedSize]);
    }];
}


- (void)rearrangeTeethHerFullyKoreanButFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect ourWriteFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [PerformerManager shared].sobHandBasalWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(RedFlexible.capContinued.existingSugarPrintableVariablesSequencerUpload)]) {
#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 badRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((badRect.origin.y + badRect.size.height) > ourWriteFrame.origin.y) {
                CGFloat fatal = ((badRect.origin.y + badRect.size.height) - ourWriteFrame.origin.y) + 10;
                
                noneBar(self);
                [UIView animateWithDuration:duration animations:^{
                    foundRoom(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -fatal);
                }];
            }
        }
    }
}


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

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

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