







#import "TailLockModernCell.h"
#define liveFix(how) __weak typeof(how) weak##how = how;
#define fitPartly(how) __strong typeof(how) how = weak##how;

@interface TailLockModernCell()



@property (nonatomic, strong) NSTimer *along;

@property (nonatomic, assign) BOOL introWonRunSob;

@end

@implementation TailLockModernCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:CGRectZero];
    if (self) {
        
        _unitTipSize = CGSizeMake(200, 40);
        _dialogTarget = 4;
        _model = nil;
        _channelCount = 3;
        _adjust = 0;
        _lookTrySixAtom = 0;
        _status = SeparatorHueExpireEncipherDenseAverage;
        _introWonRunSob = NO;
        
    }
    return self;
}

- (void)fillForPresenceHeadSceneValue
{
    CGFloat trapForm = [[self.layer presentationLayer] frame].origin.x;
    CGFloat commentWidth = self.frame.size.width;
    
    
    CGFloat speed = (self.superview.frame.size.width + commentWidth) / self.dialogTarget;
    
    
    CGFloat earSlavicTime = commentWidth / speed;
    
    if (_lookTrySixAtom > 0) {
        self.status = SharingHowIndianVolatileUndoClick;
        if (trapForm > -1 && trapForm < 1) {
            
            if (_introWonRunSob) { return;}
            _introWonRunSob = YES;
            [self pause];
            [self performSelector:@selector(resume) withObject:nil afterDelay:_lookTrySixAtom];
            [self performSelector:@selector(oldMinStatus) withObject:nil afterDelay:_lookTrySixAtom - earSlavicTime];
        }
    }
}
- (void)oldMinStatus
{
    self.status = UnionMailArrayAgreementAirChapter;
}

- (void)pipeMaskCurrencyLogDefaults:(void(^)(void))animations completion:(void(^)(BOOL))completion
{
    self.status = UnionMailArrayAgreementAirChapter;
    
    _along = [NSTimer timerWithTimeInterval:0.01 target:self selector:@selector(fillForPresenceHeadSceneValue) userInfo:nil repeats:YES];
    [[NSRunLoop currentRunLoop] addTimer:_along forMode:NSRunLoopCommonModes];
    
    
    liveFix(self);
    [UIView animateWithDuration:self.dialogTarget delay:0 options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction) animations:^{
        
        if (animations) {
            animations();
        }
        
    } completion:^(BOOL finished) {
        fitPartly(self);
        self->_status = UnionMailArrayAgreementAirChapter;
        
        if (completion) {
            completion(finished);
        }
        
        if(self->_along) {
            [self->_along invalidate];
            self->_along = nil;
        }
        
    }];
}

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

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


@end
