master
1//
2// BlockAlertView.h
3//
4//
5
6#import <UIKit/UIKit.h>
7
8@interface BlockAlertView : NSObject {
9@protected
10 UIView *_view;
11 NSMutableArray *_blocks;
12 CGFloat _height;
13 NSString *_title;
14 NSString *_message;
15 BOOL _shown;
16 BOOL _cancelBounce;
17}
18
19+ (BlockAlertView *)alertWithTitle:(NSString *)title message:(NSString *)message;
20
21+ (void)showInfoAlertWithTitle:(NSString *)title message:(NSString *)message;
22+ (void)showErrorAlert:(NSError *)error;
23
24- (id)initWithTitle:(NSString *)title message:(NSString *)message;
25
26- (void)setDestructiveButtonWithTitle:(NSString *)title block:(void (^)())block;
27- (void)setCancelButtonWithTitle:(NSString *)title block:(void (^)())block;
28- (void)addButtonWithTitle:(NSString *)title block:(void (^)())block;
29
30// Images should be named in the form "alert-IDENTIFIER-button.png"
31- (void)addButtonWithTitle:(NSString *)title imageIdentifier:(NSString*)identifier block:(void (^)())block;
32
33- (void)addComponents:(CGRect)frame;
34
35- (void)show;
36- (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated;
37
38- (void)setupDisplay;
39
40@property (nonatomic, retain) UIImage *backgroundImage;
41@property (nonatomic, readonly) UIView *view;
42@property (nonatomic, readwrite) BOOL vignetteBackground;
43
44@end