YHDecayAnimation.h 932 Bytes
//
//  YHDecayAnimation.h
//  YHAnimationDemo
//
//  Created by gaoqiang xu on 2/11/15.
//  Copyright (c) 2015 gaoqiang. All rights reserved.
//

#import "YHAnimationProxy.h"
#import "YHShorthand.h"

/**
 *  减速动画代理类
 */
@interface YHDecayAnimation : YHAnimationProxy
/**
 *   减速大小
 */
@property (assign, nonatomic) CGFloat deceleration;

@end

/**
 *  NSObject扩展,可以快速创建减速动画代理类YHDecayAnimation
 */
@interface NSObject (YHDecayAnimation)

@property (assign, nonatomic) CGFloat pop_decayDeceleration;

- (instancetype)pop_decay;

@end

#ifdef YHANIMATE_SHORTHAND

@interface NSObject (YHDecayAnimation_DropPrefix)

@property (assign, nonatomic) CGFloat decayDeceleration;

- (instancetype)decay;

@end

@implementation NSObject (YHDecayAnimation_DropPrefix)

YHSHORTHAND_PROPERTY(decayDeceleration, DecayDeceleration, CGFloat)
YHSHORTHAND_GETTER(decay, instancetype)

@end

#endif