






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

@interface HueNoneViewController ()

@end

@implementation HueNoneViewController

- (UIButton *)annotatedButton
{
    if (!_annotatedButton) {
        _annotatedButton = [[UIButton alloc] init];
        [_annotatedButton setTitle:BadgeSunIcy.greekBlueArt.malayQuotationModalWateryPutMid forState:UIControlStateNormal];
        [_annotatedButton setTitleColor:[BadgeSunIcy wayArmourColor] forState:UIControlStateNormal];
        [_annotatedButton addTarget:self action:@selector(earQueryKilogramsNormalVolumeAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _annotatedButton;
}

- (UIButton *)howPlusOldButton
{
    if (!_howPlusOldButton) {
        _howPlusOldButton = [[UIButton alloc] init];
        [_howPlusOldButton setTitle:BadgeSunIcy.greekBlueArt.sindhiRedMaxDolbySheHost forState:UIControlStateNormal];
        [_howPlusOldButton setTitleColor:[BadgeSunIcy wayArmourColor] forState:UIControlStateNormal];
        [_howPlusOldButton addTarget:self action:@selector(revisionsHardQuotationLaunchSeeAction:) forControlEvents:UIControlEventTouchUpInside];
        _howPlusOldButton.hidden = [BadgeSunIcy mealClustersPickerSpaceThatCert];
    }
    return _howPlusOldButton;
}

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

- (void)revisionsHardQuotationLaunchSeeAction:(UIButton *)sender {
    [[FixObjectManager shared] endUnfocusedWindow];
    [BadgeSunIcy revisionsHardQuotationLaunchSeeAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = BadgeSunIcy.greekBlueArt.talkCountSub;

    
    self.view.backgroundColor = [BadgeSunIcy bigStartBundlesGenericScrollColor];
    NSString *stripCancelingIterationSoftwareReset = [BadgeSunIcy bikeContactArbiterRadioHockeyImage];
    if (stripCancelingIterationSoftwareReset) {
        UIImageView *iconBoxHowImageView = [[UIImageView alloc] init];
        iconBoxHowImageView.contentMode = UIViewContentModeScaleAspectFill;
        iconBoxHowImageView.clipsToBounds = YES;
        iconBoxHowImageView.layer.cornerRadius = BadgeSunIcy.greekBlueArt.talkCountSub;
        iconBoxHowImageView.layer.masksToBounds = YES;
        [iconBoxHowImageView sd_setImageWithURL:[NSURL URLWithString:stripCancelingIterationSoftwareReset]];
        [self.view insertSubview:iconBoxHowImageView atIndex:0];
        [iconBoxHowImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.likeWatchedSockSpaPetiteImageView = iconBoxHowImageView;
    }

    [self.view addSubview:self.annotatedButton];
    [self.view addSubview:self.howPlusOldButton];
    
    CGFloat rawSize = BadgeSunIcy.greekBlueArt.echoSobAxial;
    [_annotatedButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(BadgeSunIcy.greekBlueArt.introAnyOut);
        make.size.mas_equalTo(CGSizeMake(rawSize, rawSize));
    }];
    [_howPlusOldButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(BadgeSunIcy.greekBlueArt.introAnyOut);
        make.right.equalTo(self.view).offset(-BadgeSunIcy.greekBlueArt.introAnyOut);
        make.size.mas_equalTo(CGSizeMake(rawSize, rawSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(checkFootersSynthesisAmbiguityExitsColumnsFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(expiredIterativeAmountBeenAllowUppercase:) 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([BadgeSunIcy alphabetMattingDismissalBigCalorieEncodeSize]);
    }];
}


- (void)checkFootersSynthesisAmbiguityExitsColumnsFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect listenerFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [FixObjectManager shared].linearTagLogWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(BadgeSunIcy.greekBlueArt.importantProxiesUppercaseAudiogramBasalEntry)]) {
#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 ageRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((ageRect.origin.y + ageRect.size.height) > listenerFrame.origin.y) {
                CGFloat meter = ((ageRect.origin.y + ageRect.size.height) - listenerFrame.origin.y) + 10;
                
                spaPlan(self);
                [UIView animateWithDuration:duration animations:^{
                    distorted(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -meter);
                }];
            }
        }
    }
}


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

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

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