/
PSActionSheet.h
35 lines (26 loc) · 973 Bytes
/
PSActionSheet.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
//
// PLActionSheet.h
//
// Created by Landon Fuller on 7/3/09.
// Copyright 2009 Plausible Labs Cooperative, Inc.. All rights reserved.
//
#import <UIKit/UIKit.h>
/**
* A simple block-enabled API wrapper on top of UIActionSheet.
*/
@interface PSActionSheet : NSObject <UIActionSheetDelegate> {
@private
UIActionSheet *sheet_;
NSMutableArray *blocks_;
}
@property (nonatomic, retain, readonly) UIActionSheet *sheet;
+ (id)sheetWithTitle:(NSString *)title;
- (id)initWithTitle:(NSString *)title;
- (void)setCancelButtonWithTitle:(NSString *) title block:(void (^)()) block;
- (void)setDestructiveButtonWithTitle:(NSString *) title block:(void (^)()) block;
- (void)addButtonWithTitle:(NSString *) title block:(void (^)()) block;
- (void)showInView:(UIView *)view;
- (void)showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;
- (void)showFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated;
- (NSUInteger)buttonCount;
@end