






#import "OwnPartViewController.h"

@interface OwnPartViewController ()

@end

@implementation OwnPartViewController

- (UIButton *)yahooFoldButton
{
    if (!_yahooFoldButton) {
        _yahooFoldButton = [[UIButton alloc] init];
        [_yahooFoldButton setTitle:SafariFloor.wakeTrustDay.strokedBagReturnedLinerNextSpotlight forState:UIControlStateNormal];
        [_yahooFoldButton setTitleColor:[SafariFloor nineIdiomColor] forState:UIControlStateNormal];
        [_yahooFoldButton addTarget:self action:@selector(poloTrainingPrimeCarNarrativeAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _yahooFoldButton;
}

- (UIButton *)sexSeedSayButton
{
    if (!_sexSeedSayButton) {
        _sexSeedSayButton = [[UIButton alloc] init];
        [_sexSeedSayButton setTitle:SafariFloor.wakeTrustDay.zoomPushChooseOurHitFilm forState:UIControlStateNormal];
        [_sexSeedSayButton setTitleColor:[SafariFloor nineIdiomColor] forState:UIControlStateNormal];
        [_sexSeedSayButton addTarget:self action:@selector(replyDutchResignAlpineMinuteAction:) forControlEvents:UIControlEventTouchUpInside];
        _sexSeedSayButton.hidden = [SafariFloor slowRecorderLeaveGeometricFeaturesPrepared];
    }
    return _sexSeedSayButton;
}

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

- (void)replyDutchResignAlpineMinuteAction:(UIButton *)sender {
    [[InlandDidManager shared] sourceSquareWindow];
    [SafariFloor replyDutchResignAlpineMinuteAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [SafariFloor deliveryOurButSoftnessNegativeColor];
    [self.view addSubview:self.yahooFoldButton];
    [self.view addSubview:self.sexSeedSayButton];
    
    CGFloat sonSize = SafariFloor.wakeTrustDay.sheStatement;
    [_yahooFoldButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(SafariFloor.wakeTrustDay.queryOutArt);
        make.size.mas_equalTo(CGSizeMake(sonSize, sonSize));
    }];
    [_sexSeedSayButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(SafariFloor.wakeTrustDay.queryOutArt);
        make.right.equalTo(self.view).offset(-SafariFloor.wakeTrustDay.queryOutArt);
        make.size.mas_equalTo(CGSizeMake(sonSize, sonSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(kilometerMailSymbolsEscapeArtsBroadcastFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appearsArrangerRankUnsafeAllowDolby:) 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([SafariFloor phoneticContainerAnyHybridEffortRemotelySize]);
    }];
}


- (void)kilometerMailSymbolsEscapeArtsBroadcastFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect echoPullFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [InlandDidManager shared].meanSecurelyWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(SafariFloor.wakeTrustDay.shearAdapterAlignedFactKashmiriAcquire)]) {
#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 pubRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((pubRect.origin.y + pubRect.size.height) > echoPullFrame.origin.y) {
                CGFloat brush = ((pubRect.origin.y + pubRect.size.height) - echoPullFrame.origin.y) + 10;
                
                hexLove(self);
                [UIView animateWithDuration:duration animations:^{
                    mayAnchor(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -brush);
                }];
            }
        }
    }
}


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

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

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