






#import "MalteseViewController.h"

@interface MalteseViewController ()

@end

@implementation MalteseViewController

- (UIButton *)cubeStoneButton
{
    if (!_cubeStoneButton) {
        _cubeStoneButton = [[UIButton alloc] init];
        [_cubeStoneButton setTitle:AdverbTamil.bedUndoReuse.newsstandFunctionsAuthorExponentsPinEast forState:UIControlStateNormal];
        [_cubeStoneButton setTitleColor:[AdverbTamil audiencesColor] forState:UIControlStateNormal];
        [_cubeStoneButton addTarget:self action:@selector(changeEncipherIndicatorOrderGoalAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _cubeStoneButton;
}

- (UIButton *)escapesMaxButton
{
    if (!_escapesMaxButton) {
        _escapesMaxButton = [[UIButton alloc] init];
        [_escapesMaxButton setTitle:AdverbTamil.bedUndoReuse.substringCroppingConsumesRegionsAnchoredVerify forState:UIControlStateNormal];
        [_escapesMaxButton setTitleColor:[AdverbTamil audiencesColor] forState:UIControlStateNormal];
        [_escapesMaxButton addTarget:self action:@selector(retFeedPoolMindVibrancyAction:) forControlEvents:UIControlEventTouchUpInside];
        _escapesMaxButton.hidden = [AdverbTamil spotlightDiscoverMeasureMutableProgramCurl];
    }
    return _escapesMaxButton;
}

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

- (void)retFeedPoolMindVibrancyAction:(UIButton *)sender {
    [[StrictBigManager shared] rawEastWhiteWindow];
    [AdverbTamil retFeedPoolMindVibrancyAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [AdverbTamil transientProblemBorderedKannadaNineColor];
    [self.view addSubview:self.cubeStoneButton];
    [self.view addSubview:self.escapesMaxButton];
    
    CGFloat butSize = AdverbTamil.bedUndoReuse.developerFit;
    [_cubeStoneButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(AdverbTamil.bedUndoReuse.smileWeight);
        make.size.mas_equalTo(CGSizeMake(butSize, butSize));
    }];
    [_escapesMaxButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(AdverbTamil.bedUndoReuse.smileWeight);
        make.right.equalTo(self.view).offset(-AdverbTamil.bedUndoReuse.smileWeight);
        make.size.mas_equalTo(CGSizeMake(butSize, butSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mongolianInteractProtectedFoundEnglishExposeFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mayOutputsCarAppleNotRadial:) 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([AdverbTamil declinedDesignerSystolicPartlyLogSymptomSize]);
    }];
}


- (void)mongolianInteractProtectedFoundEnglishExposeFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect foodFlatFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [StrictBigManager shared].criteriaPushWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(AdverbTamil.bedUndoReuse.envelopeSecretBadmintonDirectionMagicDetailed)]) {
#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 capRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((capRect.origin.y + capRect.size.height) > foodFlatFrame.origin.y) {
                CGFloat quote = ((capRect.origin.y + capRect.size.height) - foodFlatFrame.origin.y) + 10;
                
                zeroTab(self);
                [UIView animateWithDuration:duration animations:^{
                    dryButton(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -quote);
                }];
            }
        }
    }
}


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

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

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