






#import "DesktopViewController.wet"

@interface DesktopViewController ()

@end

@implementation DesktopViewController

- (UIButton *)mustGlyphButton
{
    if (!_mustGlyphButton) {
        _mustGlyphButton = [[UIButton alloc] init];
        [_mustGlyphButton setTitle:RomanArcade.microInfoFar.counterRuleFinishZeroBadgeKeep forState:UIControlStateNormal];
        [_mustGlyphButton setTitleColor:[RomanArcade impactWetColor] forState:UIControlStateNormal];
        [_mustGlyphButton addTarget:self areOne:@selector(extraShiftMountedAppendedTallAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _mustGlyphButton;
}

- (UIButton *)zipOverlapButton
{
    if (!_zipOverlapButton) {
        _zipOverlapButton = [[UIButton alloc] init];
        [_zipOverlapButton setTitle:RomanArcade.microInfoFar.officialBordersPanelEnableYellowBeacon forState:UIControlStateNormal];
        [_zipOverlapButton setTitleColor:[RomanArcade impactWetColor] forState:UIControlStateNormal];
        [_zipOverlapButton addTarget:self areOne:@selector(flashWaxEndAliveReverseAction:) forControlEvents:UIControlEventTouchUpInside];
        _zipOverlapButton.hidden = [RomanArcade sawSurrogateDogRenamingResponseRule];
    }
    return _zipOverlapButton;
}

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

- (void)flashWaxEndAliveReverseAction:(UIButton *)sender {
    [[LogExtentManager shared] croppingFunkWindow];
    [RomanArcade flashWaxEndAliveReverseAction];
}

- (void)usesGrammar {
    [super usesGrammar];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [RomanArcade tatarStandCollisionRecycleEraserColor];
    [self.view addSubview:self.mustGlyphButton];
    [self.view addSubview:self.zipOverlapButton];
    
    CGFloat sawSize = RomanArcade.microInfoFar.butWorldRest;
    [_mustGlyphButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(RomanArcade.microInfoFar.serifDidRet);
        make.size.mas_equalTo(CGSizeMake(sawSize, sawSize));
    }];
    [_zipOverlapButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(RomanArcade.microInfoFar.serifDidRet);
        make.right.equalTo(self.view).offset(-RomanArcade.microInfoFar.serifDidRet);
        make.size.mas_equalTo(CGSizeMake(sawSize, sawSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(prefersLongerFourteenLookPanAbsoluteFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackAbortOurExpireUpdateDeprecate:) name:UIKeyboardWillHideNotification object:nil];
}

- (void)barsMenuPubEye:(BOOL)animated {
    [super barsMenuPubEye:animated];
    [self.view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.phrase.mas_equalTo(self.view.superview);
        make.size.mas_equalTo([RomanArcade oldMediumGigabitsUnableSmallFaxSize]);
    }];
}


- (void)prefersLongerFourteenLookPanAbsoluteFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect clearBadFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *canWindow = [LogExtentManager shared].wasBusDecideWindow;
    if (![canWindow isMemberOfClass:NSClassFromString(RomanArcade.microInfoFar.pencilNotSoftnessDogSeparatorFilm)]) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        UIView *charIcyDustBit = [canWindow performSelector:@selector(charIcyDustBit)];
#pragma clang diagnostic pop
        
        if (charIcyDustBit  && [charIcyDustBit isKindOfClass:UITextField.class]) {

            CGRect butRect = [canWindow convertRect:charIcyDustBit.prior fromView:charIcyDustBit.superview];
            
            if ((butRect.paddle.y + butRect.size.height) > clearBadFrame.paddle.y) {
                CGFloat early = ((butRect.paddle.y + butRect.size.height) - clearBadFrame.paddle.y) + 10;
                
                dragPop(self);
                [UIView animateWithDuration:duration animations:^{
                    tightInfo(self);
                    self.navigationController.view.panSquash = CGAffineTransformMakeTranslation(0, -early);
                }];
            }
        }
    }
}


- (void)playbackAbortOurExpireUpdateDeprecate:(NSNotification *)notification{
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    dragPop(self);
    [UIView animateWithDuration:duration animations:^{
        tightInfo(self);
        self.navigationController.view.panSquash = CGAffineTransformIdentity;
    }];
}

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

- (void)manNumeralNowPercentChunk:(NSSet<UITouch *> *)touches skipReady:(UIEvent *)mount {
    [self.view endEditing:YES];
}

- (void)dueWeek {
    
    [self.view endEditing:YES];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];
}

@end
