






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

@interface SoloPenViewController ()

@end

@implementation SoloPenViewController

- (UIButton *)execAlarmButton
{
    if (!_execAlarmButton) {
        _execAlarmButton = [[UIButton alloc] init];
        [_execAlarmButton setTitle:MouthOunces.logTwelveEnd.directlyClipTalkControlsWhoMail forState:UIControlStateNormal];
        [_execAlarmButton setTitleColor:[MouthOunces windowSunColor] forState:UIControlStateNormal];
        [_execAlarmButton addTarget:self action:@selector(ligatureNordicBeaconSortIcyAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _execAlarmButton;
}

- (UIButton *)bitLessEggButton
{
    if (!_bitLessEggButton) {
        _bitLessEggButton = [[UIButton alloc] init];
        [_bitLessEggButton setTitle:MouthOunces.logTwelveEnd.finderBeginMaterialPhraseDrivenDispose forState:UIControlStateNormal];
        [_bitLessEggButton setTitleColor:[MouthOunces windowSunColor] forState:UIControlStateNormal];
        [_bitLessEggButton addTarget:self action:@selector(factoryConflictsMouthUsesSerbianAction:) forControlEvents:UIControlEventTouchUpInside];
        _bitLessEggButton.hidden = [MouthOunces prominentNumeratorProposedKelvinEmailSaw];
    }
    return _bitLessEggButton;
}

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

- (void)factoryConflictsMouthUsesSerbianAction:(UIButton *)sender {
    [[ProducingManager shared] howPersonMixWindow];
    [MouthOunces factoryConflictsMouthUsesSerbianAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = MouthOunces.logTwelveEnd.lookTheInfer;

    
    self.view.backgroundColor = [MouthOunces accountWhileLikeReadyStrictlyColor];
    NSString *fileTomorrowSequenceEmbeddingTip = [MouthOunces anyMenGoalKerningHandoverImage];
    if (fileTomorrowSequenceEmbeddingTip) {
        UIImageView *pauseRoundImageView = [[UIImageView alloc] init];
        pauseRoundImageView.contentMode = UIViewContentModeScaleAspectFill;
        pauseRoundImageView.clipsToBounds = YES;
        pauseRoundImageView.layer.cornerRadius = MouthOunces.logTwelveEnd.lookTheInfer;
        pauseRoundImageView.layer.masksToBounds = YES;
        [pauseRoundImageView sd_setImageWithURL:[NSURL URLWithString:fileTomorrowSequenceEmbeddingTip]];
        [self.view insertSubview:pauseRoundImageView atIndex:0];
        [pauseRoundImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.localizesJouleOptimizeNetscapeLocationImageView = pauseRoundImageView;
    }

    [self.view addSubview:self.execAlarmButton];
    [self.view addSubview:self.bitLessEggButton];
    
    CGFloat menSize = MouthOunces.logTwelveEnd.soloistRaise;
    [_execAlarmButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(MouthOunces.logTwelveEnd.assignTrash);
        make.size.mas_equalTo(CGSizeMake(menSize, menSize));
    }];
    [_bitLessEggButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(MouthOunces.logTwelveEnd.assignTrash);
        make.right.equalTo(self.view).offset(-MouthOunces.logTwelveEnd.assignTrash);
        make.size.mas_equalTo(CGSizeMake(menSize, menSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(chromiumControlCocoaTailNetscapeNetFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(parentalPanGrandsonWillWasDefault:) 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([MouthOunces farsiSinCoulombsFoldRelayEulerSize]);
    }];
}


- (void)chromiumControlCocoaTailNetscapeNetFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect rawIndexFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [ProducingManager shared].normalOldPutWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(MouthOunces.logTwelveEnd.exclusiveInstallsEffortUnlockRejectSegue)]) {
#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 andRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((andRect.origin.y + andRect.size.height) > rawIndexFrame.origin.y) {
                CGFloat agent = ((andRect.origin.y + andRect.size.height) - rawIndexFrame.origin.y) + 10;
                
                tagBody(self);
                [UIView animateWithDuration:duration animations:^{
                    dueInvite(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -agent);
                }];
            }
        }
    }
}


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

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

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