YHDecayAnimation.h
932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// 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