







#import "WordEffortFormCell.h"
#define lostHis(but) __weak typeof(but) weak##but = but;
#define bandMouth(but) __strong typeof(but) but = weak##but;

@interface WordEffortFormCell()



@property (nonatomic, strong) NSTimer *setup;

@property (nonatomic, assign) BOOL jumpCameraFold;

@end

@implementation WordEffortFormCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:CGRectZero];
    if (self) {
        
        _mixPairSize = CGSizeMake(200, 40);
        _addStopTable = 4;
        _model = nil;
        _channelCount = 3;
        _baltic = 0;
        _usedPrepTwoEgg = 0;
        _status = FirstShiftPreventedMouthContactOverwrite;
        _jumpCameraFold = NO;
        
    }
    return self;
}

- (void)femaleSimulatesSymmetricTypeRowValue
{
    CGFloat drawLink = [[self.layer presentationLayer] frame].origin.x;
    CGFloat flatBagWidth = self.frame.size.width;
    
    
    CGFloat speed = (self.superview.frame.size.width + flatBagWidth) / self.addStopTable;
    
    
    CGFloat genreRateTime = flatBagWidth / speed;
    
    if (_usedPrepTwoEgg > 0) {
        self.status = GesturesCascadeSpaLongSlashAppearing;
        if (-1< drawLink < 1) {
            
            if (_jumpCameraFold) { return;}
            _jumpCameraFold = YES;
            [self pause];
            [self performSelector:@selector(resume) withObject:nil afterDelay:_usedPrepTwoEgg];
            [self performSelector:@selector(hiddenStatus) withObject:nil afterDelay:_usedPrepTwoEgg - genreRateTime];
        }
    }
}
- (void)hiddenStatus
{
    self.status = IndentKurdishStrokingCostKeepChecker;
}

- (void)adjustingLossyBoldCursorLast:(void(^)(void))animations completion:(void(^)(BOOL))completion
{
    self.status = IndentKurdishStrokingCostKeepChecker;
    
    _setup = [NSTimer timerWithTimeInterval:0.01 target:self selector:@selector(femaleSimulatesSymmetricTypeRowValue) userInfo:nil repeats:YES];
    [[NSRunLoop currentRunLoop] addTimer:_setup forMode:NSRunLoopCommonModes];
    
    
    lostHis(self);
    [UIView animateWithDuration:self.addStopTable delay:0 options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction) animations:^{
        
        if (animations) {
            animations();
        }
        
    } completion:^(BOOL finished) {
        bandMouth(self);
        self->_status = IndentKurdishStrokingCostKeepChecker;
        
        if (completion) {
            completion(finished);
        }
        
        if(self->_setup) {
            [self->_setup invalidate];
            self->_setup = nil;
        }
        
    }];
}

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

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


@end
