






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

@interface RearCapViewController ()

@end

@implementation RearCapViewController

- (UIButton *)hintGenreButton
{
    if (!_hintGenreButton) {
        _hintGenreButton = [[UIButton alloc] init];
        [_hintGenreButton setTitle:ApplyToggle.findSwipeOur.seekActionsForeverSolveRollFit forState:UIControlStateNormal];
        [_hintGenreButton setTitleColor:[ApplyToggle pieceRoleColor] forState:UIControlStateNormal];
        [_hintGenreButton addTarget:self action:@selector(removableAutomaticSongBreakingLighterAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _hintGenreButton;
}

- (UIButton *)sendGermanButton
{
    if (!_sendGermanButton) {
        _sendGermanButton = [[UIButton alloc] init];
        [_sendGermanButton setTitle:ApplyToggle.findSwipeOur.saturateExchangeRenameEstablishOnceSources forState:UIControlStateNormal];
        [_sendGermanButton setTitleColor:[ApplyToggle pieceRoleColor] forState:UIControlStateNormal];
        [_sendGermanButton addTarget:self action:@selector(surfaceCapacityLaunchedFarsiProfileAction:) forControlEvents:UIControlEventTouchUpInside];
        _sendGermanButton.hidden = [ApplyToggle authorPatternsPressesContainerDogRomanian];
    }
    return _sendGermanButton;
}

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

- (void)surfaceCapacityLaunchedFarsiProfileAction:(UIButton *)sender {
    [[CombiningManager shared] priorityFontWindow];
    [ApplyToggle surfaceCapacityLaunchedFarsiProfileAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = ApplyToggle.findSwipeOur.twoMenuShare;

    
    self.view.backgroundColor = [ApplyToggle obstacleWeekdayTwoCoalescedAdobeColor];
    NSString *disappearDrawingFixFatExceeds = [ApplyToggle birthMasterClimbingStrategyParseImage];
    if (disappearDrawingFixFatExceeds) {
        UIImageView *eyeLostAgeImageView = [[UIImageView alloc] init];
        eyeLostAgeImageView.contentMode = UIViewContentModeScaleAspectFill;
        eyeLostAgeImageView.clipsToBounds = YES;
        eyeLostAgeImageView.layer.cornerRadius = ApplyToggle.findSwipeOur.twoMenuShare;
        eyeLostAgeImageView.layer.masksToBounds = YES;
        [eyeLostAgeImageView sd_setImageWithURL:[NSURL URLWithString:disappearDrawingFixFatExceeds]];
        [self.view insertSubview:eyeLostAgeImageView atIndex:0];
        [eyeLostAgeImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.diskWarningUpscaleHockeyDecomposeImageView = eyeLostAgeImageView;
    }

    [self.view addSubview:self.hintGenreButton];
    [self.view addSubview:self.sendGermanButton];
    
    CGFloat fixSize = ApplyToggle.findSwipeOur.hexPackIntro;
    [_hintGenreButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(ApplyToggle.findSwipeOur.downhillToo);
        make.size.mas_equalTo(CGSizeMake(fixSize, fixSize));
    }];
    [_sendGermanButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(ApplyToggle.findSwipeOur.downhillToo);
        make.right.equalTo(self.view).offset(-ApplyToggle.findSwipeOur.downhillToo);
        make.size.mas_equalTo(CGSizeMake(fixSize, fixSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(watchedNepaliLimitedArchiveRunPermuteFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(latencyFigureGatherReferentEnterRecursive:) 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([ApplyToggle fireRearBracketedHandoffFreestyleBundlesSize]);
    }];
}


- (void)watchedNepaliLimitedArchiveRunPermuteFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect metalNapFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [CombiningManager shared].ownNegotiateWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(ApplyToggle.findSwipeOur.waterDiscountsRowsDaysQualityPedometer)]) {
#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 theRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((theRect.origin.y + theRect.size.height) > metalNapFrame.origin.y) {
                CGFloat cubic = ((theRect.origin.y + theRect.size.height) - metalNapFrame.origin.y) + 10;
                
                theGain(self);
                [UIView animateWithDuration:duration animations:^{
                    vowelFile(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -cubic);
                }];
            }
        }
    }
}


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

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

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