






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

@interface CarrierViewController ()

@end

@implementation CarrierViewController

- (UIButton *)earStrideButton
{
    if (!_earStrideButton) {
        _earStrideButton = [[UIButton alloc] init];
        [_earStrideButton setTitle:OutTapPlain.parentMixMay.blendFitGreenArrangerAdvertiseSave forState:UIControlStateNormal];
        [_earStrideButton setTitleColor:[OutTapPlain valueFillColor] forState:UIControlStateNormal];
        [_earStrideButton addTarget:self action:@selector(groupKitFisheyeBordersIdentityAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _earStrideButton;
}

- (UIButton *)acrossStopButton
{
    if (!_acrossStopButton) {
        _acrossStopButton = [[UIButton alloc] init];
        [_acrossStopButton setTitle:OutTapPlain.parentMixMay.swapEarlierNotNegatePassiveMenu forState:UIControlStateNormal];
        [_acrossStopButton setTitleColor:[OutTapPlain valueFillColor] forState:UIControlStateNormal];
        [_acrossStopButton addTarget:self action:@selector(unlockReuseTopShelfLabelAction:) forControlEvents:UIControlEventTouchUpInside];
        _acrossStopButton.hidden = [OutTapPlain partnerPrecisionExternInsideApertureBack];
    }
    return _acrossStopButton;
}

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

- (void)unlockReuseTopShelfLabelAction:(UIButton *)sender {
    [[AwayGlyphManager shared] provisionKitWindow];
    [OutTapPlain unlockReuseTopShelfLabelAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = OutTapPlain.parentMixMay.transformFit;

    
    self.view.backgroundColor = [OutTapPlain stoodSeeWasBlueSpaColor];
    NSString *compoundBarPasswordsConsumerCat = [OutTapPlain possibleRegistryBikeKnowProducerImage];
    if (compoundBarPasswordsConsumerCat) {
        UIImageView *bodyBalticImageView = [[UIImageView alloc] init];
        bodyBalticImageView.contentMode = UIViewContentModeScaleAspectFill;
        bodyBalticImageView.clipsToBounds = YES;
        bodyBalticImageView.layer.cornerRadius = OutTapPlain.parentMixMay.transformFit;
        bodyBalticImageView.layer.masksToBounds = YES;
        [bodyBalticImageView sd_setImageWithURL:[NSURL URLWithString:compoundBarPasswordsConsumerCat]];
        [self.view insertSubview:bodyBalticImageView atIndex:0];
        [bodyBalticImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.illSamplePeriodServicesIntegersImageView = bodyBalticImageView;
    }

    [self.view addSubview:self.earStrideButton];
    [self.view addSubview:self.acrossStopButton];
    
    CGFloat didSize = OutTapPlain.parentMixMay.sandboxTamil;
    [_earStrideButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(OutTapPlain.parentMixMay.boundIndian);
        make.size.mas_equalTo(CGSizeMake(didSize, didSize));
    }];
    [_acrossStopButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(OutTapPlain.parentMixMay.boundIndian);
        make.right.equalTo(self.view).offset(-OutTapPlain.parentMixMay.boundIndian);
        make.size.mas_equalTo(CGSizeMake(didSize, didSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mostAffinityRuleDigitizedHueEggFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(unsafeBendAnswerCornersSwahiliIteration:) 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([OutTapPlain stampOnceAlcoholUserDryThiaminSize]);
    }];
}


- (void)mostAffinityRuleDigitizedHueEggFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect leastButFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [AwayGlyphManager shared].tagKeysSwipeWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(OutTapPlain.parentMixMay.smallerGradeNameLabeledSmartHistory)]) {
#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 retRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((retRect.origin.y + retRect.size.height) > leastButFrame.origin.y) {
                CGFloat brief = ((retRect.origin.y + retRect.size.height) - leastButFrame.origin.y) + 10;
                
                spaBike(self);
                [UIView animateWithDuration:duration animations:^{
                    parserWin(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -brief);
                }];
            }
        }
    }
}


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

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

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