






#import "RankMayViewController.h"

@interface RankMayViewController ()

@end

@implementation RankMayViewController

- (UIButton *)twoPostalButton
{
    if (!_twoPostalButton) {
        _twoPostalButton = [[UIButton alloc] init];
        [_twoPostalButton setTitle:MakerOldest.redoneFinder.degreesSignatureInsetMouseSpectralConstants forState:UIControlStateNormal];
        [_twoPostalButton setTitleColor:[MakerOldest sexAcceptColor] forState:UIControlStateNormal];
        [_twoPostalButton addTarget:self action:@selector(tibetanPrimePolicyStateTerabytesAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _twoPostalButton;
}

- (UIButton *)jobPanListButton
{
    if (!_jobPanListButton) {
        _jobPanListButton = [[UIButton alloc] init];
        [_jobPanListButton setTitle:MakerOldest.redoneFinder.boundSelectAdapterRetainedUtteranceMatrix forState:UIControlStateNormal];
        [_jobPanListButton setTitleColor:[MakerOldest sexAcceptColor] forState:UIControlStateNormal];
        [_jobPanListButton addTarget:self action:@selector(energySayObscuresCountingMemberAction:) forControlEvents:UIControlEventTouchUpInside];
        _jobPanListButton.hidden = [MakerOldest getAssetEyeDisableLeftServices];
    }
    return _jobPanListButton;
}

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

- (void)energySayObscuresCountingMemberAction:(UIButton *)sender {
    [[FunnelArmManager shared] undoSilencedWindow];
    [MakerOldest energySayObscuresCountingMemberAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [MakerOldest deviceShrinkWarpAlbumSessionsColor];
    [self.view addSubview:self.twoPostalButton];
    [self.view addSubview:self.jobPanListButton];
    
    CGFloat minSize = MakerOldest.redoneFinder.busScanScale;
    [_twoPostalButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(MakerOldest.redoneFinder.featRawPipe);
        make.size.mas_equalTo(CGSizeMake(minSize, minSize));
    }];
    [_jobPanListButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(MakerOldest.redoneFinder.featRawPipe);
        make.right.equalTo(self.view).offset(-MakerOldest.redoneFinder.featRawPipe);
        make.size.mas_equalTo(CGSizeMake(minSize, minSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(marginsFrameSpacingMegabytesMovePreserveFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(driveFairCompositeTopDecisionYears:) 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([MakerOldest subOptAnchorJabberEpisodeArterySize]);
    }];
}


- (void)marginsFrameSpacingMegabytesMovePreserveFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect lookFullFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [FunnelArmManager shared].bedShiftMoveWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(MakerOldest.redoneFinder.oneMinimizeDailyTagsPastChromatic)]) {
#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 fitRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((fitRect.origin.y + fitRect.size.height) > lookFullFrame.origin.y) {
                CGFloat draft = ((fitRect.origin.y + fitRect.size.height) - lookFullFrame.origin.y) + 10;
                
                hellman(self);
                [UIView animateWithDuration:duration animations:^{
                    serverBin(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -draft);
                }];
            }
        }
    }
}


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

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

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