forked from dogo/SCLAlertView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCLTimerDisplay.h
More file actions
39 lines (34 loc) · 1.01 KB
/
SCLTimerDisplay.h
File metadata and controls
39 lines (34 loc) · 1.01 KB
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
//
// SCLTimerDisplay.h
// SCLAlertView
//
// Created by Taylor Ryan on 8/18/15.
// Copyright (c) 2015-2016 AnyKey Entertainment. All rights reserved.
//
// Taken from https://stackoverflow.com/questions/11783439/uibutton-with-timer
#if defined(__has_feature) && __has_feature(modules)
@import UIKit;
#else
#import <UIKit/UIKit.h>
#endif
#import "SCLButton.h"
@interface SCLTimerDisplay : UIView {
CGFloat currentAngle;
CGFloat currentTime;
CGFloat timerLimit;
CGFloat radius;
CGFloat lineWidth;
NSTimer *timer;
SCLActionBlock completedBlock;
}
@property CGFloat currentAngle;
@property NSInteger buttonIndex;
@property (nonatomic) UIColor *color;
@property (nonatomic) BOOL reverse;
- (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r;
- (instancetype)initWithOrigin:(CGPoint)origin radius:(CGFloat)r lineWidth:(CGFloat)width;
- (void)updateFrame:(CGSize)size;
- (void)cancelTimer;
- (void)stopTimer;
- (void)startTimerWithTimeLimit:(int)tl completed:(SCLActionBlock)completed;
@end