forked from dogo/SCLAlertView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCLButton.h
More file actions
84 lines (70 loc) · 2.04 KB
/
Copy pathSCLButton.h
File metadata and controls
84 lines (70 loc) · 2.04 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
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
80
81
82
83
84
//
// SCLButton.h
// SCLAlertView
//
// Created by Diogo Autilio on 9/26/14.
// Copyright (c) 2014 AnyKey Entertainment. All rights reserved.
//
@import UIKit;
@interface SCLButton : UIButton
typedef void (^SCLActionBlock)(void);
typedef BOOL (^SCLValidationBlock)(void);
typedef NSDictionary* (^CompleteButtonFormatBlock)(void);
typedef NSDictionary* (^ButtonFormatBlock)(void);
// Action Types
typedef NS_ENUM(NSInteger, SCLActionType)
{
None,
Selector,
Block
};
/** Set button action type.
*
* Holds the button action type.
*/
@property SCLActionType actionType;
/** Set action button block.
*
* TODO
*/
@property (nonatomic, copy) SCLActionBlock actionBlock;
/** Set Validation button block.
*
* Set one kind of validation and keeps the alert visible until the validation is successful
*/
@property (nonatomic, copy) SCLValidationBlock validationBlock;
/** Set Complete button format block.
*
* Holds the complete button format block.
* Support keys : backgroundColor, borderWidth, borderColor, textColor
*/
@property (nonatomic, copy) CompleteButtonFormatBlock completeButtonFormatBlock;
/** Set button format block.
*
* Holds the button format block.
* Support keys : backgroundColor, borderWidth, borderColor, textColor
*/
@property (nonatomic, copy) ButtonFormatBlock buttonFormatBlock;
/** Set SCLButton color.
*
* Set SCLButton color.
*/
@property (nonatomic, strong) UIColor *defaultBackgroundColor;
/** Set Target object.
*
* Target is an object that holds the information necessary to send a message to another object when an event occurs.
*/
@property id target;
/** Set selector id.
*
* A selector is the name used to select a method to execute for an object,
* or the unique identifier that replaces the name when the source code is compiled.
*/
@property SEL selector;
/** Parse button configuration
*
* Parse ButtonFormatBlock and CompleteButtonFormatBlock setting custom configuration.
* Set keys : backgroundColor, borderWidth, borderColor, textColor
*/
- (void)parseConfig:(NSDictionary *)buttonConfig;
@end