







#import "GoalItalicThatCell.h"
#define schemes(our) __weak typeof(our) weak##our = our;
#define ditherFit(our) __strong typeof(our) our = weak##our;

@interface GoalItalicThatCell()



@property (nonatomic, strong) NSTimer *modal;

@property (nonatomic, assign) BOOL loopWinBadWord;

@end

@implementation GoalItalicThatCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:CGRectZero];
    if (self) {
        
        _gainTenSize = CGSizeMake(200, 40);
        _boundCadence = 4;
        _model = nil;
        _channelCount = 3;
        _busWay = 0;
        _needDragNotice = 0;
        _status = ObscuresLingerDiamondSelectGlobalExactness;
        _loopWinBadWord = NO;
        
    }
    return self;
}

- (void)frontWorkElevenCanSegmentedValue
{
    CGFloat assembly = [[self.layer presentationLayer] frame].origin.x;
    CGFloat hitPoolWidth = self.frame.size.width;
    
    
    CGFloat speed = (self.superview.frame.size.width + hitPoolWidth) / self.boundCadence;
    
    
    CGFloat characterTime = hitPoolWidth / speed;
    
    if (_needDragNotice > 0) {
        self.status = ConvertOptimizedChinaMayBiometryCampaign;
        if (-1< assembly < 1) {
            
            if (_loopWinBadWord) { return;}
            _loopWinBadWord = YES;
            [self pause];
            [self performSelector:@selector(resume) withObject:nil afterDelay:_needDragNotice];
            [self performSelector:@selector(pencilStatus) withObject:nil afterDelay:_needDragNotice - characterTime];
        }
    }
}
- (void)pencilStatus
{
    self.status = FloatingExactnessAirPartlyNapHas;
}

- (void)delayedSinhaleseLogExternalNecessary:(void(^)(void))animations completion:(void(^)(BOOL))completion
{
    self.status = FloatingExactnessAirPartlyNapHas;
    
    _modal = [NSTimer timerWithTimeInterval:0.01 target:self selector:@selector(frontWorkElevenCanSegmentedValue) userInfo:nil repeats:YES];
    [[NSRunLoop currentRunLoop] addTimer:_modal forMode:NSRunLoopCommonModes];
    
    
    schemes(self);
    [UIView animateWithDuration:self.boundCadence delay:0 options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction) animations:^{
        
        if (animations) {
            animations();
        }
        
    } completion:^(BOOL finished) {
        ditherFit(self);
        self->_status = FloatingExactnessAirPartlyNapHas;
        
        if (completion) {
            completion(finished);
        }
        
        if(self->_modal) {
            [self->_modal invalidate];
            self->_modal = nil;
        }
        
    }];
}

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

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


@end
