






#import "RebuildViewController.h"

@interface RebuildViewController ()

@end

@implementation RebuildViewController

- (UIButton *)cellTraitButton
{
    if (!_cellTraitButton) {
        _cellTraitButton = [[UIButton alloc] init];
        [_cellTraitButton setTitle:CityPublish.halfInferCan.headlineDayRestingBondSliderDirectly forState:UIControlStateNormal];
        [_cellTraitButton setTitleColor:[CityPublish sideHelloColor] forState:UIControlStateNormal];
        [_cellTraitButton addTarget:self action:@selector(nibblesParentalPathSubIntervalsAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _cellTraitButton;
}

- (UIButton *)ringRemoveButton
{
    if (!_ringRemoveButton) {
        _ringRemoveButton = [[UIButton alloc] init];
        [_ringRemoveButton setTitle:CityPublish.halfInferCan.enclosingZeroWarpSecretInsulinPlane forState:UIControlStateNormal];
        [_ringRemoveButton setTitleColor:[CityPublish sideHelloColor] forState:UIControlStateNormal];
        [_ringRemoveButton addTarget:self action:@selector(resourcesCenteringOverageChunkyPatchAction:) forControlEvents:UIControlEventTouchUpInside];
        _ringRemoveButton.hidden = [CityPublish bannerCircularSpaceEndGestureFilters];
    }
    return _ringRemoveButton;
}

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

- (void)resourcesCenteringOverageChunkyPatchAction:(UIButton *)sender {
    [[MapUnwindManager shared] uniformHindiWindow];
    [CityPublish resourcesCenteringOverageChunkyPatchAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [CityPublish croppingGetDownTheClimbedColor];
    [self.view addSubview:self.cellTraitButton];
    [self.view addSubview:self.ringRemoveButton];
    
    CGFloat jobSize = CityPublish.halfInferCan.bitsRawPolar;
    [_cellTraitButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(CityPublish.halfInferCan.tightDueAdd);
        make.size.mas_equalTo(CGSizeMake(jobSize, jobSize));
    }];
    [_ringRemoveButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(CityPublish.halfInferCan.tightDueAdd);
        make.right.equalTo(self.view).offset(-CityPublish.halfInferCan.tightDueAdd);
        make.size.mas_equalTo(CGSizeMake(jobSize, jobSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(removalSocketMostFinishingReleasedWasFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ignoresTaskOpaqueMalformedFinalizeDownhill:) 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([CityPublish workflowAndDialogBuildAdverbUsedSize]);
    }];
}


- (void)removalSocketMostFinishingReleasedWasFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect kinGivenFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [MapUnwindManager shared].liveDogClearWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(CityPublish.halfInferCan.insideModifierGenericsGroupMemberLaunched)]) {
#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 busRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((busRect.origin.y + busRect.size.height) > kinGivenFrame.origin.y) {
                CGFloat malay = ((busRect.origin.y + busRect.size.height) - kinGivenFrame.origin.y) + 10;
                
                archery(self);
                [UIView animateWithDuration:duration animations:^{
                    leapHover(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -malay);
                }];
            }
        }
    }
}


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

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

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