






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

@interface SobAtomViewController ()

@end

@implementation SobAtomViewController

- (UIButton *)silentNetButton
{
    if (!_silentNetButton) {
        _silentNetButton = [[UIButton alloc] init];
        [_silentNetButton setTitle:MixSnowBits.packRouteToo.jumpStillImperialHybridChatSigning forState:UIControlStateNormal];
        [_silentNetButton setTitleColor:[MixSnowBits stakeCertColor] forState:UIControlStateNormal];
        [_silentNetButton addTarget:self action:@selector(telephotoMenBandNapGenerateAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _silentNetButton;
}

- (UIButton *)hueBookNotButton
{
    if (!_hueBookNotButton) {
        _hueBookNotButton = [[UIButton alloc] init];
        [_hueBookNotButton setTitle:MixSnowBits.packRouteToo.viewIntensityFixBrushDroppedSlider forState:UIControlStateNormal];
        [_hueBookNotButton setTitleColor:[MixSnowBits stakeCertColor] forState:UIControlStateNormal];
        [_hueBookNotButton addTarget:self action:@selector(lowerTrialFlashEvictHitAction:) forControlEvents:UIControlEventTouchUpInside];
        _hueBookNotButton.hidden = [MixSnowBits pronounCoverageWaitFriendMessagingAdjusted];
    }
    return _hueBookNotButton;
}

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

- (void)lowerTrialFlashEvictHitAction:(UIButton *)sender {
    [[FactBasicManager shared] ductilityIllWindow];
    [MixSnowBits lowerTrialFlashEvictHitAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = MixSnowBits.packRouteToo.tagsAndBegan;

    
    self.view.backgroundColor = [MixSnowBits chunkyLatvianCookieLossyProcedureColor];
    NSString *committedOriginStripTwistNumeric = [MixSnowBits literWetFilmEqualDeviationImage];
    if (committedOriginStripTwistNumeric) {
        UIImageView *boldEnergyImageView = [[UIImageView alloc] init];
        boldEnergyImageView.contentMode = UIViewContentModeScaleAspectFill;
        boldEnergyImageView.clipsToBounds = YES;
        boldEnergyImageView.layer.cornerRadius = MixSnowBits.packRouteToo.tagsAndBegan;
        boldEnergyImageView.layer.masksToBounds = YES;
        [boldEnergyImageView sd_setImageWithURL:[NSURL URLWithString:committedOriginStripTwistNumeric]];
        [self.view insertSubview:boldEnergyImageView atIndex:0];
        [boldEnergyImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.clampEachAudioCloudOurImageView = boldEnergyImageView;
    }

    [self.view addSubview:self.silentNetButton];
    [self.view addSubview:self.hueBookNotButton];
    
    CGFloat keySize = MixSnowBits.packRouteToo.textTabCheck;
    [_silentNetButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(MixSnowBits.packRouteToo.parentSlide);
        make.size.mas_equalTo(CGSizeMake(keySize, keySize));
    }];
    [_hueBookNotButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(MixSnowBits.packRouteToo.parentSlide);
        make.right.equalTo(self.view).offset(-MixSnowBits.packRouteToo.parentSlide);
        make.size.mas_equalTo(CGSizeMake(keySize, keySize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(advertisePressGallonsPredictedPrototypeStylusFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sceneStreamExponentWrestlingHiddenExpansion:) 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([MixSnowBits itemClearLoopActualSkinWarpSize]);
    }];
}


- (void)advertisePressGallonsPredictedPrototypeStylusFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect insertedFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [FactBasicManager shared].arcadeCupIcyWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(MixSnowBits.packRouteToo.selfGainPersonalHumanUnsafeBitmap)]) {
#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 icyRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((icyRect.origin.y + icyRect.size.height) > insertedFrame.origin.y) {
                CGFloat daily = ((icyRect.origin.y + icyRect.size.height) - insertedFrame.origin.y) + 10;
                
                verySum(self);
                [UIView animateWithDuration:duration animations:^{
                    debugging(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -daily);
                }];
            }
        }
    }
}


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

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

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