master
1//
2// BlockActionSheet.h
3//
4//
5
6#import <UIKit/UIKit.h>
7
8/**
9 * A simple block-enabled API wrapper on top of UIActionSheet.
10 */
11@interface BlockActionSheet : NSObject {
12@private
13 UIView *_view;
14 NSMutableArray *_blocks;
15 CGFloat _height;
16}
17
18@property (nonatomic, readonly) UIView *view;
19@property (nonatomic, readwrite) BOOL vignetteBackground;
20
21+ (id)sheetWithTitle:(NSString *)title;
22
23- (id)initWithTitle:(NSString *)title;
24
25- (void)setCancelButtonWithTitle:(NSString *) title block:(void (^)()) block;
26- (void)setDestructiveButtonWithTitle:(NSString *) title block:(void (^)()) block;
27- (void)addButtonWithTitle:(NSString *) title block:(void (^)()) block;
28
29- (void)setCancelButtonWithTitle:(NSString *) title atIndex:(NSInteger)index block:(void (^)()) block;
30- (void)setDestructiveButtonWithTitle:(NSString *) title atIndex:(NSInteger)index block:(void (^)()) block;
31- (void)addButtonWithTitle:(NSString *) title atIndex:(NSInteger)index block:(void (^)()) block;
32
33- (void)showInView:(UIView *)view;
34
35- (NSUInteger)buttonCount;
36
37@end