






#import "LocallyViewController.h"

@interface LocallyViewController ()

@end

@implementation LocallyViewController

- (UIButton *)squareButButton
{
    if (!_squareButButton) {
        _squareButButton = [[UIButton alloc] init];
        [_squareButButton setTitle:FrictionShe.headphoneMay.unloadFeedUpperSpaceSunBad forState:UIControlStateNormal];
        [_squareButButton setTitleColor:[FrictionShe unionExecColor] forState:UIControlStateNormal];
        [_squareButButton addTarget:self action:@selector(canonicalBuildSubmitEffectiveKeysAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _squareButButton;
}

- (UIButton *)bikeDarwinButton
{
    if (!_bikeDarwinButton) {
        _bikeDarwinButton = [[UIButton alloc] init];
        [_bikeDarwinButton setTitle:FrictionShe.headphoneMay.originsThirteenFocusingAffineWetEffort forState:UIControlStateNormal];
        [_bikeDarwinButton setTitleColor:[FrictionShe unionExecColor] forState:UIControlStateNormal];
        [_bikeDarwinButton addTarget:self action:@selector(rareCoverOriginalCostSplitAction:) forControlEvents:UIControlEventTouchUpInside];
        _bikeDarwinButton.hidden = [FrictionShe popCountedKinSlovenianSoftwareContext];
    }
    return _bikeDarwinButton;
}

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

- (void)rareCoverOriginalCostSplitAction:(UIButton *)sender {
    [[OpaqueKeyManager shared] overMatchPinWindow];
    [FrictionShe rareCoverOriginalCostSplitAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [FrictionShe dueFunBinaryEncodeNowColor];
    [self.view addSubview:self.squareButButton];
    [self.view addSubview:self.bikeDarwinButton];
    
    CGFloat sobSize = FrictionShe.headphoneMay.finderSunBig;
    [_squareButButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(FrictionShe.headphoneMay.chainAccept);
        make.size.mas_equalTo(CGSizeMake(sobSize, sobSize));
    }];
    [_bikeDarwinButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(FrictionShe.headphoneMay.chainAccept);
        make.right.equalTo(self.view).offset(-FrictionShe.headphoneMay.chainAccept);
        make.size.mas_equalTo(CGSizeMake(sobSize, sobSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(alphabetSunChannelPassivelyScalarHeapFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(canCharacterAppleFormattedOwnNearby:) 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([FrictionShe traveledPinHourlyTripleBiometryBuddySize]);
    }];
}


- (void)alphabetSunChannelPassivelyScalarHeapFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect samplingFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [OpaqueKeyManager shared].onlineResignWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(FrictionShe.headphoneMay.returnPercentPastBarSchemeFeat)]) {
#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 notRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((notRect.origin.y + notRect.size.height) > samplingFrame.origin.y) {
                CGFloat dance = ((notRect.origin.y + notRect.size.height) - samplingFrame.origin.y) + 10;
                
                canRace(self);
                [UIView animateWithDuration:duration animations:^{
                    bayerMake(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -dance);
                }];
            }
        }
    }
}


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

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

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