/
PulsingHaloLayer.h
79 lines (63 loc) · 1.85 KB
/
PulsingHaloLayer.h
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// PulsingHaloLayer.h
// https://github.com/shu223/PulsingHalo
//
// Created by shuichi on 12/5/13.
// Copyright (c) 2013 Shuichi Tsutsumi. All rights reserved.
//
// Inspired by https://github.com/samvermette/SVPulsingAnnotationView
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
@interface PulsingHaloLayer : CAReplicatorLayer
/**
* The default value of this property is @c 60pt.
*/
@property (nonatomic, assign) CGFloat radius;
/**
* The default value of this property is @c 0.0.
*/
@property (nonatomic, assign) CGFloat fromValueForRadius;
/**
* The default value of this property is @c 0.45.
*/
@property (nonatomic, assign) CGFloat fromValueForAlpha __attribute__ ((unavailable("Now the alpha channel of the backgroundColor is used.")));
/**
* The value of this property should be ranging from @c 0 to @c 1 (exclusive).
*
* The default value of this property is @c 0.2.
*/
@property (nonatomic, assign) CGFloat keyTimeForHalfOpacity;
/**
* The animation duration in seconds.
*
* The default value of this property is @c 3.
*/
@property (nonatomic, assign) NSTimeInterval animationDuration;
/**
* The animation interval in seconds.
*
* The default value of this property is @c 0.
*/
@property (nonatomic, assign) NSTimeInterval pulseInterval;
/**
* The default value of this property is @c YES.
*/
@property (nonatomic, assign) BOOL useTimingFunction;
/**
* The default value of this property is @c 1.
*/
@property (nonatomic, assign) NSInteger haloLayerNumber;
/**
* The animation delay in seconds.
*
* The default value of this property is @c 1.
*/
@property (nonatomic, assign) NSTimeInterval startInterval;
/**
* When this value is true, the halo will be automatically resumed after entering foreground.
*
* The default value of this property is YES.
*/
@property (nonatomic, assign) BOOL shouldResume;
- (void)start;
@end