-
Notifications
You must be signed in to change notification settings - Fork 0
/
BlockAlertView.h
41 lines (30 loc) · 1.1 KB
/
BlockAlertView.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
//
// BlockAlertView.h
//
//
#import <UIKit/UIKit.h>
@interface BlockAlertView : NSObject {
@protected
UIView *_view;
NSMutableArray *_blocks;
CGFloat _height;
NSString *_title;
NSString *_message;
BOOL _shown;
BOOL _cancelBounce;
}
+ (BlockAlertView *)alertWithTitle:(NSString *)title message:(NSString *)message;
+ (void)showInfoAlertWithTitle:(NSString *)title message:(NSString *)message;
+ (void)showErrorAlert:(NSError *)error;
- (instancetype)initWithTitle:(NSString *)title message:(NSString *)message NS_DESIGNATED_INITIALIZER;
- (void)setDestructiveButtonWithTitle:(NSString *)title block:(void (^)())block;
- (void)setCancelButtonWithTitle:(NSString *)title block:(void (^)())block;
- (void)addButtonWithTitle:(NSString *)title block:(void (^)())block;
- (void)addComponents:(CGRect)frame;
- (void)show;
- (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated;
- (void)setupDisplay;
@property (nonatomic, strong) UIImage *backgroundImage;
@property (nonatomic, readonly) UIView *view;
@property (nonatomic, readwrite) BOOL vignetteBackground;
@end