







#import "AtomToneSquareCell.h"
#define extents(pin) __weak typeof(pin) weak##pin = pin;
#define beforeAge(pin) __strong typeof(pin) pin = weak##pin;

@interface AtomToneSquareCell()



@property (nonatomic, strong) NSTimer *chest;

@property (nonatomic, assign) BOOL advertiseSlant;

@end

@implementation AtomToneSquareCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:CGRectZero];
    if (self) {
        
        _lenientSize = CGSizeMake(200, 40);
        _moireIndices = 4;
        _model = nil;
        _channelCount = 3;
        _notFun = 0;
        _bigSafeGraySum = 0;
        _status = BedCropOwnerAirTruncatedBack;
        _advertiseSlant = NO;
        
    }
    return self;
}

- (void)extentSayExpandGuideCosmicValue
{
    CGFloat forTrack = [[self.layer presentationLayer] frame].origin.x;
    CGFloat nineRetWidth = self.frame.size.width;
    
    
    CGFloat speed = (self.superview.frame.size.width + nineRetWidth) / self.moireIndices;
    
    
    CGFloat pubAdjustTime = nineRetWidth / speed;
    
    if (_bigSafeGraySum > 0) {
        self.status = PrettyTrainerAllowSurgeCollapsesHall;
        if (-1< forTrack < 1) {
            
            if (_advertiseSlant) { return;}
            _advertiseSlant = YES;
            [self pause];
            [self performSelector:@selector(resume) withObject:nil afterDelay:_bigSafeGraySum];
            [self performSelector:@selector(fatKinStatus) withObject:nil afterDelay:_bigSafeGraySum - pubAdjustTime];
        }
    }
}
- (void)fatKinStatus
{
    self.status = CursorSubConvertedSoftnessBeforeLoading;
}

- (void)reorderPreventedPrematureClangCar:(void(^)(void))animations completion:(void(^)(BOOL))completion
{
    self.status = CursorSubConvertedSoftnessBeforeLoading;
    
    _chest = [NSTimer timerWithTimeInterval:0.01 target:self selector:@selector(extentSayExpandGuideCosmicValue) userInfo:nil repeats:YES];
    [[NSRunLoop currentRunLoop] addTimer:_chest forMode:NSRunLoopCommonModes];
    
    
    extents(self);
    [UIView animateWithDuration:self.moireIndices delay:0 options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction) animations:^{
        
        if (animations) {
            animations();
        }
        
    } completion:^(BOOL finished) {
        beforeAge(self);
        self->_status = CursorSubConvertedSoftnessBeforeLoading;
        
        if (completion) {
            completion(finished);
        }
        
        if(self->_chest) {
            [self->_chest invalidate];
            self->_chest = nil;
        }
        
    }];
}

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

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


@end
