






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

@interface TimeRunViewController ()

@end

@implementation TimeRunViewController

- (UIButton *)realEvictButton
{
    if (!_realEvictButton) {
        _realEvictButton = [[UIButton alloc] init];
        [_realEvictButton setTitle:ReloadThird.overlapQuote.burstProposalTakeUnsavedAgeAccepting forState:UIControlStateNormal];
        [_realEvictButton setTitleColor:[ReloadThird subRecentColor] forState:UIControlStateNormal];
        [_realEvictButton addTarget:self action:@selector(signatureCaseWeekCursorNorthAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _realEvictButton;
}

- (UIButton *)sawLaotianButton
{
    if (!_sawLaotianButton) {
        _sawLaotianButton = [[UIButton alloc] init];
        [_sawLaotianButton setTitle:ReloadThird.overlapQuote.indigoOrdinalsArrivalAccuracyFarsiHas forState:UIControlStateNormal];
        [_sawLaotianButton setTitleColor:[ReloadThird subRecentColor] forState:UIControlStateNormal];
        [_sawLaotianButton addTarget:self action:@selector(adapterResetPhotoCompositeCapturingAction:) forControlEvents:UIControlEventTouchUpInside];
        _sawLaotianButton.hidden = [ReloadThird hueOriginsJobClockImpliedShadow];
    }
    return _sawLaotianButton;
}

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

- (void)adapterResetPhotoCompositeCapturingAction:(UIButton *)sender {
    [[ManualCupManager shared] twoUploadingWindow];
    [ReloadThird adapterResetPhotoCompositeCapturingAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = ReloadThird.overlapQuote.drivenEndLog;

    
    self.view.backgroundColor = [ReloadThird niacinTipRunningCorrectedEnvelopeColor];
    NSString *sinSolidRequestedOurSerial = [ReloadThird northFeedbackThirdSentencesSupplyImage];
    if (sinSolidRequestedOurSerial) {
        UIImageView *hashYouSpaImageView = [[UIImageView alloc] init];
        hashYouSpaImageView.contentMode = UIViewContentModeScaleAspectFill;
        hashYouSpaImageView.clipsToBounds = YES;
        hashYouSpaImageView.layer.cornerRadius = ReloadThird.overlapQuote.drivenEndLog;
        hashYouSpaImageView.layer.masksToBounds = YES;
        [hashYouSpaImageView sd_setImageWithURL:[NSURL URLWithString:sinSolidRequestedOurSerial]];
        [self.view insertSubview:hashYouSpaImageView atIndex:0];
        [hashYouSpaImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.earExpiresMalayalamRenewalInviteImageView = hashYouSpaImageView;
    }

    [self.view addSubview:self.realEvictButton];
    [self.view addSubview:self.sawLaotianButton];
    
    CGFloat pinSize = ReloadThird.overlapQuote.nowRemembers;
    [_realEvictButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(ReloadThird.overlapQuote.vortexStair);
        make.size.mas_equalTo(CGSizeMake(pinSize, pinSize));
    }];
    [_sawLaotianButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(ReloadThird.overlapQuote.vortexStair);
        make.right.equalTo(self.view).offset(-ReloadThird.overlapQuote.vortexStair);
        make.size.mas_equalTo(CGSizeMake(pinSize, pinSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(typeLegacySafetyLaunchingKitWaitingFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(documentsCoachedDaySleetPolarHours:) 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([ReloadThird evictApplierInsulinWorldPatternsKeysSize]);
    }];
}


- (void)typeLegacySafetyLaunchingKitWaitingFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect treePostFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [ManualCupManager shared].paperMillOptWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(ReloadThird.overlapQuote.backwardsDanceUnloadClickedBridgingShutter)]) {
#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 mixRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((mixRect.origin.y + mixRect.size.height) > treePostFrame.origin.y) {
                CGFloat trait = ((mixRect.origin.y + mixRect.size.height) - treePostFrame.origin.y) + 10;
                
                lawRoom(self);
                [UIView animateWithDuration:duration animations:^{
                    altimeter(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -trait);
                }];
            }
        }
    }
}


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

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

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