







#import "ExternalSmoothCell.h"
#define paceBig(son) __weak typeof(son) weak##son = son;
#define buildRule(son) __strong typeof(son) son = weak##son;

@interface ExternalSmoothCell()



@property (nonatomic, strong) NSTimer *solve;

@property (nonatomic, assign) BOOL drawDoneAbsent;

@end

@implementation ExternalSmoothCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:CGRectZero];
    if (self) {
        
        _slowPopSize = CGSizeMake(200, 40);
        _haveFinalize = 4;
        _model = nil;
        _channelCount = 3;
        _keyKey = 0;
        _serverHairHash = 0;
        _status = AirFeedSessionsBedRadiansMembers;
        _drawDoneAbsent = NO;
        
    }
    return self;
}

- (void)alwaysHeadphoneDiscardsFixingRomanValue
{
    CGFloat linearly = [[self.layer presentationLayer] frame].origin.x;
    CGFloat daysPubWidth = self.frame.size.width;
    
    
    CGFloat speed = (self.superview.frame.size.width + daysPubWidth) / self.haveFinalize;
    
    
    CGFloat reloadPenTime = daysPubWidth / speed;
    
    if (_serverHairHash > 0) {
        self.status = AlienBroadcastClippingThousandsCiphersCan;
        if (-1< linearly < 1) {
            
            if (_drawDoneAbsent) { return;}
            _drawDoneAbsent = YES;
            [self pause];
            [self performSelector:@selector(resume) withObject:nil afterDelay:_serverHairHash];
            [self performSelector:@selector(capForStatus) withObject:nil afterDelay:_serverHairHash - reloadPenTime];
        }
    }
}
- (void)capForStatus
{
    self.status = PoolBarEngineCanIndicatedHockey;
}

- (void)runCloseParsingReusePredicted:(void(^)(void))animations completion:(void(^)(BOOL))completion
{
    self.status = PoolBarEngineCanIndicatedHockey;
    
    _solve = [NSTimer timerWithTimeInterval:0.01 target:self selector:@selector(alwaysHeadphoneDiscardsFixingRomanValue) userInfo:nil repeats:YES];
    [[NSRunLoop currentRunLoop] addTimer:_solve forMode:NSRunLoopCommonModes];
    
    
    paceBig(self);
    [UIView animateWithDuration:self.haveFinalize delay:0 options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction) animations:^{
        
        if (animations) {
            animations();
        }
        
    } completion:^(BOOL finished) {
        buildRule(self);
        self->_status = PoolBarEngineCanIndicatedHockey;
        
        if (completion) {
            completion(finished);
        }
        
        if(self->_solve) {
            [self->_solve invalidate];
            self->_solve = nil;
        }
        
    }];
}

- (void)pause
{
    
    CFTimeInterval tableTime = [self.layer convertTime:CACurrentMediaTime() fromLayer:nil];
    
    
    self.layer.timeOffset = tableTime;
    
    
    self.layer.speed = 0;
}

- (void)resume
{
    
    CFTimeInterval tableTime = self.layer.timeOffset;
    
    CFTimeInterval mixSayTabSleet = CACurrentMediaTime() - tableTime;
    
    self.layer.timeOffset = 0;
    
    self.layer.beginTime = mixSayTabSleet;
    
    self.layer.speed = 1;
}


@end
