






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

@interface BoldRedViewController ()

@end

@implementation BoldRedViewController

- (UIButton *)surgeMaskButton
{
    if (!_surgeMaskButton) {
        _surgeMaskButton = [[UIButton alloc] init];
        [_surgeMaskButton setTitle:SaveWayTaps.offerHitEasy.detachingBackCommittedAudienceYardReply forState:UIControlStateNormal];
        [_surgeMaskButton setTitleColor:[SaveWayTaps mouthHintColor] forState:UIControlStateNormal];
        [_surgeMaskButton addTarget:self action:@selector(paletteExtendsDitheredFlightRingAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _surgeMaskButton;
}

- (UIButton *)arrayChestButton
{
    if (!_arrayChestButton) {
        _arrayChestButton = [[UIButton alloc] init];
        [_arrayChestButton setTitle:SaveWayTaps.offerHitEasy.remoteAltimeterDropSpanLoseSugar forState:UIControlStateNormal];
        [_arrayChestButton setTitleColor:[SaveWayTaps mouthHintColor] forState:UIControlStateNormal];
        [_arrayChestButton addTarget:self action:@selector(inuitParserIntegralDitheredCenterAction:) forControlEvents:UIControlEventTouchUpInside];
        _arrayChestButton.hidden = [SaveWayTaps latitudeGujaratiRowsStrictRelayCarrier];
    }
    return _arrayChestButton;
}

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

- (void)inuitParserIntegralDitheredCenterAction:(UIButton *)sender {
    [[PrimeArtsManager shared] helpItsModelWindow];
    [SaveWayTaps inuitParserIntegralDitheredCenterAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = SaveWayTaps.offerHitEasy.zipSideCanon;

    
    self.view.backgroundColor = [SaveWayTaps ruleInstantBrushNanogramsTwelveColor];
    NSString *localeRearrangeTallPaperTrap = [SaveWayTaps transmitMasterMembersLocalCutImage];
    if (localeRearrangeTallPaperTrap) {
        UIImageView *canHalfAgeImageView = [[UIImageView alloc] init];
        canHalfAgeImageView.contentMode = UIViewContentModeScaleAspectFill;
        canHalfAgeImageView.clipsToBounds = YES;
        canHalfAgeImageView.layer.cornerRadius = SaveWayTaps.offerHitEasy.zipSideCanon;
        canHalfAgeImageView.layer.masksToBounds = YES;
        [canHalfAgeImageView sd_setImageWithURL:[NSURL URLWithString:localeRearrangeTallPaperTrap]];
        [self.view insertSubview:canHalfAgeImageView atIndex:0];
        [canHalfAgeImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.arrowBadEmbeddedPinCharImageView = canHalfAgeImageView;
    }

    [self.view addSubview:self.surgeMaskButton];
    [self.view addSubview:self.arrayChestButton];
    
    CGFloat boxSize = SaveWayTaps.offerHitEasy.tagNotLonger;
    [_surgeMaskButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(SaveWayTaps.offerHitEasy.tagsBitMind);
        make.size.mas_equalTo(CGSizeMake(boxSize, boxSize));
    }];
    [_arrayChestButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(SaveWayTaps.offerHitEasy.tagsBitMind);
        make.right.equalTo(self.view).offset(-SaveWayTaps.offerHitEasy.tagsBitMind);
        make.size.mas_equalTo(CGSizeMake(boxSize, boxSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(injectionStylizeSafetySlabReorderPassFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(retRetryBinFatManualWake:) 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([SaveWayTaps utteranceDescenderMicroAcceptedDomainConcludeSize]);
    }];
}


- (void)injectionStylizeSafetySlabReorderPassFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect forwardsFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [PrimeArtsManager shared].staleButLeftWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(SaveWayTaps.offerHitEasy.gigahertzCertMapAfterRelayFinnish)]) {
#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 tapRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((tapRect.origin.y + tapRect.size.height) > forwardsFrame.origin.y) {
                CGFloat roman = ((tapRect.origin.y + tapRect.size.height) - forwardsFrame.origin.y) + 10;
                
                liveFix(self);
                [UIView animateWithDuration:duration animations:^{
                    fitPartly(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -roman);
                }];
            }
        }
    }
}


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

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

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