






#import "IllegalViewController.h"

@interface IllegalViewController ()

@end

@implementation IllegalViewController

- (UIButton *)whileSkinButton
{
    if (!_whileSkinButton) {
        _whileSkinButton = [[UIButton alloc] init];
        [_whileSkinButton setTitle:DueIcyFetch.itsPosterIcy.mapFunkAmbiguousFilterTopObstacle forState:UIControlStateNormal];
        [_whileSkinButton setTitleColor:[DueIcyFetch plateReadColor] forState:UIControlStateNormal];
        [_whileSkinButton addTarget:self action:@selector(shiftFinnishSumPenLiftAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _whileSkinButton;
}

- (UIButton *)dueLexiconButton
{
    if (!_dueLexiconButton) {
        _dueLexiconButton = [[UIButton alloc] init];
        [_dueLexiconButton setTitle:DueIcyFetch.itsPosterIcy.otherUsageBoxDeliveredBundlesMedium forState:UIControlStateNormal];
        [_dueLexiconButton setTitleColor:[DueIcyFetch plateReadColor] forState:UIControlStateNormal];
        [_dueLexiconButton addTarget:self action:@selector(totalHighestTicketsRunCommonAction:) forControlEvents:UIControlEventTouchUpInside];
        _dueLexiconButton.hidden = [DueIcyFetch opaqueMovieActiveTremorAfterPlace];
    }
    return _dueLexiconButton;
}

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

- (void)totalHighestTicketsRunCommonAction:(UIButton *)sender {
    [[TalkArrayManager shared] whileRearBigWindow];
    [DueIcyFetch totalHighestTicketsRunCommonAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [DueIcyFetch legalConvergedSolveGigahertzCourseColor];
    [self.view addSubview:self.whileSkinButton];
    [self.view addSubview:self.dueLexiconButton];
    
    CGFloat addSize = DueIcyFetch.itsPosterIcy.managerMetal;
    [_whileSkinButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(DueIcyFetch.itsPosterIcy.nowWeekForm);
        make.size.mas_equalTo(CGSizeMake(addSize, addSize));
    }];
    [_dueLexiconButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(DueIcyFetch.itsPosterIcy.nowWeekForm);
        make.right.equalTo(self.view).offset(-DueIcyFetch.itsPosterIcy.nowWeekForm);
        make.size.mas_equalTo(CGSizeMake(addSize, addSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(outletRetriedNetPintSymbolsSideFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appearingOwnCoulombsVerboseEscapeCombine:) 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([DueIcyFetch aloneNaturalRestoredOrdinalZeroDocumentSize]);
    }];
}


- (void)outletRetriedNetPintSymbolsSideFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect bendYardFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [TalkArrayManager shared].oceanIntegerWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(DueIcyFetch.itsPosterIcy.transientBounceTempStopItalicLowercase)]) {
#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 sumRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((sumRect.origin.y + sumRect.size.height) > bendYardFrame.origin.y) {
                CGFloat heavy = ((sumRect.origin.y + sumRect.size.height) - bendYardFrame.origin.y) + 10;
                
                glucose(self);
                [UIView animateWithDuration:duration animations:^{
                    mixTriple(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -heavy);
                }];
            }
        }
    }
}


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

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

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