







#import "StopSafetyMindCell.h"
#define formRow(obj) __weak typeof(obj) weak##obj = obj;
#define restExits(obj) __strong typeof(obj) obj = weak##obj;

@interface StopSafetyMindCell()



@property (nonatomic, strong) NSTimer *occur;

@property (nonatomic, assign) BOOL shipmentChrome;

@end

@implementation StopSafetyMindCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:CGRectZero];
    if (self) {
        
        _listHitSize = CGSizeMake(200, 40);
        _deferringWon = 4;
        _model = nil;
        _channelCount = 3;
        _runBit = 0;
        _gurationPencil = 0;
        _status = AcquireCelsiusSubWarpLoopsRestored;
        _shipmentChrome = NO;
        
    }
    return self;
}

- (void)queryActualCombineFindFlatnessValue
{
    CGFloat areaMean = [[self.layer presentationLayer] frame].origin.x;
    CGFloat busySunWidth = self.frame.size.width;
    
    
    CGFloat speed = (self.superview.frame.size.width + busySunWidth) / self.deferringWon;
    
    
    CGFloat secondUseTime = busySunWidth / speed;
    
    if (_gurationPencil > 0) {
        self.status = PortionEffortViabilitySalientReleasedArrival;
        if (areaMean > -1 && areaMean < 1) {
            
            if (_shipmentChrome) { return;}
            _shipmentChrome = YES;
            [self pause];
            [self performSelector:@selector(resume) withObject:nil afterDelay:_gurationPencil];
            [self performSelector:@selector(squareStatus) withObject:nil afterDelay:_gurationPencil - secondUseTime];
        }
    }
}
- (void)squareStatus
{
    self.status = WillStepsonAnchorsLoadingTowerEnd;
}

- (void)bouncingEncodingLevelRenewLuminance:(void(^)(void))animations completion:(void(^)(BOOL))completion
{
    self.status = WillStepsonAnchorsLoadingTowerEnd;
    
    _occur = [NSTimer timerWithTimeInterval:0.01 target:self selector:@selector(queryActualCombineFindFlatnessValue) userInfo:nil repeats:YES];
    [[NSRunLoop currentRunLoop] addTimer:_occur forMode:NSRunLoopCommonModes];
    
    
    formRow(self);
    [UIView animateWithDuration:self.deferringWon delay:0 options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction) animations:^{
        
        if (animations) {
            animations();
        }
        
    } completion:^(BOOL finished) {
        restExits(self);
        self->_status = WillStepsonAnchorsLoadingTowerEnd;
        
        if (completion) {
            completion(finished);
        }
        
        if(self->_occur) {
            [self->_occur invalidate];
            self->_occur = nil;
        }
        
    }];
}

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

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


@end
