






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

@interface EpisodeViewController ()

@end

@implementation EpisodeViewController

- (UIButton *)redefinedButton
{
    if (!_redefinedButton) {
        _redefinedButton = [[UIButton alloc] init];
        [_redefinedButton setTitle:PutBelowEye.yetRevealHow.commandsColoredTurkmenWrappingHintLibrary forState:UIControlStateNormal];
        [_redefinedButton setTitleColor:[PutBelowEye andHebrewColor] forState:UIControlStateNormal];
        [_redefinedButton addTarget:self action:@selector(sizeObserversSigmoidServerArtistAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _redefinedButton;
}

- (UIButton *)leadHowHasButton
{
    if (!_leadHowHasButton) {
        _leadHowHasButton = [[UIButton alloc] init];
        [_leadHowHasButton setTitle:PutBelowEye.yetRevealHow.periodSquaredMalteseHierarchyAwakeNot forState:UIControlStateNormal];
        [_leadHowHasButton setTitleColor:[PutBelowEye andHebrewColor] forState:UIControlStateNormal];
        [_leadHowHasButton addTarget:self action:@selector(overdueHundredFoundTryOrderAction:) forControlEvents:UIControlEventTouchUpInside];
        _leadHowHasButton.hidden = [PutBelowEye operateInferResizingFourteenSleetInstalls];
    }
    return _leadHowHasButton;
}

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

- (void)overdueHundredFoundTryOrderAction:(UIButton *)sender {
    [[StillSockManager shared] beaconListenWindow];
    [PutBelowEye overdueHundredFoundTryOrderAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = PutBelowEye.yetRevealHow.retryRowView;

    
    self.view.backgroundColor = [PutBelowEye forHasAlphabetLocalCelticColor];
    NSString *winCarbonNibblesDroppedStill = [PutBelowEye stampEnclosingWebpageCatForceImage];
    if (winCarbonNibblesDroppedStill) {
        UIImageView *inverseWetImageView = [[UIImageView alloc] init];
        inverseWetImageView.contentMode = UIViewContentModeScaleAspectFill;
        inverseWetImageView.clipsToBounds = YES;
        inverseWetImageView.layer.cornerRadius = PutBelowEye.yetRevealHow.retryRowView;
        inverseWetImageView.layer.masksToBounds = YES;
        [inverseWetImageView sd_setImageWithURL:[NSURL URLWithString:winCarbonNibblesDroppedStill]];
        [self.view insertSubview:inverseWetImageView atIndex:0];
        [inverseWetImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.tempWithMovieShortSinkImageView = inverseWetImageView;
    }

    [self.view addSubview:self.redefinedButton];
    [self.view addSubview:self.leadHowHasButton];
    
    CGFloat redSize = PutBelowEye.yetRevealHow.bigTagsBasal;
    [_redefinedButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(PutBelowEye.yetRevealHow.modelOwnBus);
        make.size.mas_equalTo(CGSizeMake(redSize, redSize));
    }];
    [_leadHowHasButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(PutBelowEye.yetRevealHow.modelOwnBus);
        make.right.equalTo(self.view).offset(-PutBelowEye.yetRevealHow.modelOwnBus);
        make.size.mas_equalTo(CGSizeMake(redSize, redSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(cameraAbortChargeAccessedDiamondPickFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(prefersDeliveryPreciseSlightHairExpecting:) 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([PutBelowEye northNetMindAffectingRunMessagingSize]);
    }];
}


- (void)cameraAbortChargeAccessedDiamondPickFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect relayTwoFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [StillSockManager shared].tenRomanCaseWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(PutBelowEye.yetRevealHow.seeSoccerDeparturePolicyTerabytesCousin)]) {
#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 hasRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((hasRect.origin.y + hasRect.size.height) > relayTwoFrame.origin.y) {
                CGFloat chest = ((hasRect.origin.y + hasRect.size.height) - relayTwoFrame.origin.y) + 10;
                
                schemes(self);
                [UIView animateWithDuration:duration animations:^{
                    ditherFit(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -chest);
                }];
            }
        }
    }
}


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

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

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