






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

@interface LogTintViewController ()

@end

@implementation LogTintViewController

- (UIButton *)funnelDidButton
{
    if (!_funnelDidButton) {
        _funnelDidButton = [[UIButton alloc] init];
        [_funnelDidButton setTitle:MaskTheGray.andRomanPath.commonFailingSymptomFailCallbacksImmutable forState:UIControlStateNormal];
        [_funnelDidButton setTitleColor:[MaskTheGray badgeLeapColor] forState:UIControlStateNormal];
        [_funnelDidButton addTarget:self action:@selector(portraitsGetTurkmenParagraphMatrixAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _funnelDidButton;
}

- (UIButton *)herClampedButton
{
    if (!_herClampedButton) {
        _herClampedButton = [[UIButton alloc] init];
        [_herClampedButton setTitle:MaskTheGray.andRomanPath.unwindingHeapRowRestartEqualPretty forState:UIControlStateNormal];
        [_herClampedButton setTitleColor:[MaskTheGray badgeLeapColor] forState:UIControlStateNormal];
        [_herClampedButton addTarget:self action:@selector(frameRespectsRenewedTowerSamplingAction:) forControlEvents:UIControlEventTouchUpInside];
        _herClampedButton.hidden = [MaskTheGray iterateFeedSplatPresetMillRespond];
    }
    return _herClampedButton;
}

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

- (void)frameRespectsRenewedTowerSamplingAction:(UIButton *)sender {
    [[TorchVeryManager shared] redSideClockWindow];
    [MaskTheGray frameRespectsRenewedTowerSamplingAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = MaskTheGray.andRomanPath.planeDefines;

    
    self.view.backgroundColor = [MaskTheGray prepareMeterRelativeEventMuteColor];
    NSString *secureCategoryScriptsDecipherContinued = [MaskTheGray youGramHostScriptCollisionImage];
    if (secureCategoryScriptsDecipherContinued) {
        UIImageView *redoWaxDogImageView = [[UIImageView alloc] init];
        redoWaxDogImageView.contentMode = UIViewContentModeScaleAspectFill;
        redoWaxDogImageView.clipsToBounds = YES;
        redoWaxDogImageView.layer.cornerRadius = MaskTheGray.andRomanPath.planeDefines;
        redoWaxDogImageView.layer.masksToBounds = YES;
        [redoWaxDogImageView sd_setImageWithURL:[NSURL URLWithString:secureCategoryScriptsDecipherContinued]];
        [self.view insertSubview:redoWaxDogImageView atIndex:0];
        [redoWaxDogImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.personArmDelayedUseNetImageView = redoWaxDogImageView;
    }

    [self.view addSubview:self.funnelDidButton];
    [self.view addSubview:self.herClampedButton];
    
    CGFloat trySize = MaskTheGray.andRomanPath.clockwiseTab;
    [_funnelDidButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(MaskTheGray.andRomanPath.funkOverMen);
        make.size.mas_equalTo(CGSizeMake(trySize, trySize));
    }];
    [_herClampedButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(MaskTheGray.andRomanPath.funkOverMen);
        make.right.equalTo(self.view).offset(-MaskTheGray.andRomanPath.funkOverMen);
        make.size.mas_equalTo(CGSizeMake(trySize, trySize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(joinLookupPeriodAnyNumericRenewingFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(degreeExpectsMajorMetricStretchIts:) 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([MaskTheGray destroyUrgentEveryHeadphoneLightenButtonSize]);
    }];
}


- (void)joinLookupPeriodAnyNumericRenewingFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect drainAndFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [TorchVeryManager shared].boostPutPoloWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(MaskTheGray.andRomanPath.earPluralProvisionSeekingKeepInactive)]) {
#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 pinRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((pinRect.origin.y + pinRect.size.height) > drainAndFrame.origin.y) {
                CGFloat began = ((pinRect.origin.y + pinRect.size.height) - drainAndFrame.origin.y) + 10;
                
                managed(self);
                [UIView animateWithDuration:duration animations:^{
                    workspace(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -began);
                }];
            }
        }
    }
}


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

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

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