






#import "RetDarkViewController.h"

@interface RetDarkViewController ()

@end

@implementation RetDarkViewController

- (UIButton *)loudBuddyButton
{
    if (!_loudBuddyButton) {
        _loudBuddyButton = [[UIButton alloc] init];
        [_loudBuddyButton setTitle:WinNeedHang.chargePenSin.smoothedEndSerialControlsResultsIterative forState:UIControlStateNormal];
        [_loudBuddyButton setTitleColor:[WinNeedHang launchBigColor] forState:UIControlStateNormal];
        [_loudBuddyButton addTarget:self action:@selector(neutralBayerChromiumHomepageDisplayAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _loudBuddyButton;
}

- (UIButton *)martialAreButton
{
    if (!_martialAreButton) {
        _martialAreButton = [[UIButton alloc] init];
        [_martialAreButton setTitle:WinNeedHang.chargePenSin.anchoringHomepageDatabaseGravityManganeseTool forState:UIControlStateNormal];
        [_martialAreButton setTitleColor:[WinNeedHang launchBigColor] forState:UIControlStateNormal];
        [_martialAreButton addTarget:self action:@selector(printerRadioGivenReversesActiveAction:) forControlEvents:UIControlEventTouchUpInside];
        _martialAreButton.hidden = [WinNeedHang routeDiscoverWaistTomorrowOwnershipNone];
    }
    return _martialAreButton;
}

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

- (void)printerRadioGivenReversesActiveAction:(UIButton *)sender {
    [[DeltaWarpManager shared] incorrectHitWindow];
    [WinNeedHang printerRadioGivenReversesActiveAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [WinNeedHang minimumEggItsWrappingMildColor];
    [self.view addSubview:self.loudBuddyButton];
    [self.view addSubview:self.martialAreButton];
    
    CGFloat rawSize = WinNeedHang.chargePenSin.clangTypeFax;
    [_loudBuddyButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(WinNeedHang.chargePenSin.useMayPrime);
        make.size.mas_equalTo(CGSizeMake(rawSize, rawSize));
    }];
    [_martialAreButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(WinNeedHang.chargePenSin.useMayPrime);
        make.right.equalTo(self.view).offset(-WinNeedHang.chargePenSin.useMayPrime);
        make.size.mas_equalTo(CGSizeMake(rawSize, rawSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(everySigningSignerAppendDiamondServicesFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(halftoneOutletPortalCanonEnergyUnderline:) 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([WinNeedHang identicalEditorsReleasedAvailLawGrantedSize]);
    }];
}


- (void)everySigningSignerAppendDiamondServicesFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect ringScanFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [DeltaWarpManager shared].inferiorsWaxWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(WinNeedHang.chargePenSin.animatorContinuedPopRunMisplacedInfinity)]) {
#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 airRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((airRect.origin.y + airRect.size.height) > ringScanFrame.origin.y) {
                CGFloat civil = ((airRect.origin.y + airRect.size.height) - ringScanFrame.origin.y) + 10;
                
                expires(self);
                [UIView animateWithDuration:duration animations:^{
                    milePrior(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -civil);
                }];
            }
        }
    }
}


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

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

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