






#import "ChannelViewController.h"

@interface ChannelViewController ()

@end

@implementation ChannelViewController

- (UIButton *)ovulationButton
{
    if (!_ovulationButton) {
        _ovulationButton = [[UIButton alloc] init];
        [_ovulationButton setTitle:InvertPinch.didThousands.decipherSleepMildGeorgianOpticalOrnaments forState:UIControlStateNormal];
        [_ovulationButton setTitleColor:[InvertPinch justTildeColor] forState:UIControlStateNormal];
        [_ovulationButton addTarget:self action:@selector(birthSymmetricArrayOverallFatalAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _ovulationButton;
}

- (UIButton *)maskHeaderButton
{
    if (!_maskHeaderButton) {
        _maskHeaderButton = [[UIButton alloc] init];
        [_maskHeaderButton setTitle:InvertPinch.didThousands.balticSnapshotPresentedBoxWinSchemes forState:UIControlStateNormal];
        [_maskHeaderButton setTitleColor:[InvertPinch justTildeColor] forState:UIControlStateNormal];
        [_maskHeaderButton addTarget:self action:@selector(capturesVersionCountedBracketBarAction:) forControlEvents:UIControlEventTouchUpInside];
        _maskHeaderButton.hidden = [InvertPinch effectStillDecayTailDiastolicStone];
    }
    return _maskHeaderButton;
}

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

- (void)capturesVersionCountedBracketBarAction:(UIButton *)sender {
    [[UploadWhoManager shared] windowMayCapWindow];
    [InvertPinch capturesVersionCountedBracketBarAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [InvertPinch insertingElderGigabitsRowBothColor];
    [self.view addSubview:self.ovulationButton];
    [self.view addSubview:self.maskHeaderButton];
    
    CGFloat midSize = InvertPinch.didThousands.illBitNepali;
    [_ovulationButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(InvertPinch.didThousands.repairPower);
        make.size.mas_equalTo(CGSizeMake(midSize, midSize));
    }];
    [_maskHeaderButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(InvertPinch.didThousands.repairPower);
        make.right.equalTo(self.view).offset(-InvertPinch.didThousands.repairPower);
        make.size.mas_equalTo(CGSizeMake(midSize, midSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(retExportingProblemValidatesOneTapsFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadStorylineFeetCameraBitGenerates:) 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([InvertPinch finishingEffectiveVignetteInnerLemmaMisplacedSize]);
    }];
}


- (void)retExportingProblemValidatesOneTapsFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect multiplyFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [UploadWhoManager shared].roomSystolicWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(InvertPinch.didThousands.assameseInterGoldenSelectedShortcutCritical)]) {
#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 askRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((askRect.origin.y + askRect.size.height) > multiplyFrame.origin.y) {
                CGFloat dirty = ((askRect.origin.y + askRect.size.height) - multiplyFrame.origin.y) + 10;
                
                itsBeen(self);
                [UIView animateWithDuration:duration animations:^{
                    leastMail(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -dirty);
                }];
            }
        }
    }
}


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

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

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