







#import "MaxLineOneWrapCell.h"
#define allFeat(arm) __weak typeof(arm) weak##arm = arm;
#define expandAir(arm) __strong typeof(arm) arm = weak##arm;

@interface MaxLineOneWrapCell()



@property (nonatomic, strong) NSTimer *audio;

@property (nonatomic, assign) BOOL selfHexBagNear;

@end

@implementation MaxLineOneWrapCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:CGRectZero];
    if (self) {
        
        _manSnowSize = CGSizeMake(200, 40);
        _addressesFar = 4;
        _model = nil;
        _channelCount = 3;
        _lambda = 0;
        _envelopeDefine = 0;
        _status = BriefExceptionShortcutEmailZeroLappish;
        _selfHexBagNear = NO;
        
    }
    return self;
}

- (void)quantizeTaggerListenEarBalancedValue
{
    CGFloat queueMax = [[self.layer presentationLayer] frame].origin.x;
    CGFloat axesPanWidth = self.frame.size.width;
    
    
    CGFloat speed = (self.superview.frame.size.width + axesPanWidth) / self.addressesFar;
    
    
    CGFloat clockwiseTime = axesPanWidth / speed;
    
    if (_envelopeDefine > 0) {
        self.status = ImproperUniformResponderCellFollowCarrier;
        if (-1< queueMax < 1) {
            
            if (_selfHexBagNear) { return;}
            _selfHexBagNear = YES;
            [self pause];
            [self performSelector:@selector(resume) withObject:nil afterDelay:_envelopeDefine];
            [self performSelector:@selector(tooPutStatus) withObject:nil afterDelay:_envelopeDefine - clockwiseTime];
        }
    }
}
- (void)tooPutStatus
{
    self.status = AnimationWhoHisCousinSeeArrow;
}

- (void)existingCadencePressedCyrillicProfiles:(void(^)(void))animations completion:(void(^)(BOOL))completion
{
    self.status = AnimationWhoHisCousinSeeArrow;
    
    _audio = [NSTimer timerWithTimeInterval:0.01 target:self selector:@selector(quantizeTaggerListenEarBalancedValue) userInfo:nil repeats:YES];
    [[NSRunLoop currentRunLoop] addTimer:_audio forMode:NSRunLoopCommonModes];
    
    
    allFeat(self);
    [UIView animateWithDuration:self.addressesFar delay:0 options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction) animations:^{
        
        if (animations) {
            animations();
        }
        
    } completion:^(BOOL finished) {
        expandAir(self);
        self->_status = AnimationWhoHisCousinSeeArrow;
        
        if (completion) {
            completion(finished);
        }
        
        if(self->_audio) {
            [self->_audio invalidate];
            self->_audio = nil;
        }
        
    }];
}

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

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


@end
