This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathPCAngularActivityIndicatorView.h
68 lines (55 loc) · 2.78 KB
/
PCAngularActivityIndicatorView.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
//
// PCAngularActivityIndicatorView.h
//
// Copyright (c) 2014 Phillip Caudell [email protected]
//
// The MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, PCAngularActivityIndicatorViewStyle) {
PCAngularActivityIndicatorViewStyleSmall,
PCAngularActivityIndicatorViewStyleDefault,
PCAngularActivityIndicatorViewStyleLarge
};
/**
Use an activity indicator to show that a task is in progress. An activity indicator appears as a “spiral” that is either spinning or stopped.
You control when an activity indicator animates by calling the startAnimating and stopAnimating methods. To automatically hide the activity indicator when animation stops, set the hidesWhenStopped property to YES.
*/
@interface PCAngularActivityIndicatorView : UIView
/**
The color of the activity indicator.
*/
@property (nonatomic, strong) UIColor *color;
/**
Returns whether the receiver is animating.
*/
@property (nonatomic, readonly, getter = isAnimating) BOOL animating;
/**
The basic appearance of the activity indicator.
*/
@property (nonatomic, assign) PCAngularActivityIndicatorViewStyle activityIndicatorViewStyle;
/**
A Boolean value that controls whether the receiver is hidden when the animation is stopped.
*/
@property (nonatomic, assign) BOOL hidesWhenStopped;
/**
Initializes and returns an activity-indicator object.
@param style An enum that specifies the style of the object to be created.
*/
- (id)initWithActivityIndicatorStyle:(PCAngularActivityIndicatorViewStyle)style;
- (id)initWithCustomSize:(CGSize)size lineWidth:(CGFloat)lineWidth andDuration:(CGFloat)duration;
/**
Starts the animation of the progress indicator.
*/
- (void)startAnimating;
/**
Stops the animation of the progress indicator.
*/
- (void)stopAnimating;
@end