forked from steipete/PSAlertView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPSPDFActionSheet.h
40 lines (27 loc) · 1.03 KB
/
PSPDFActionSheet.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
//
// PSPDFActionSheet.h
// PSPDFKit
//
// Copyright (c) 2012 Peter Steinberger. All rights reserved.
//
/// Helper to add block features to UIActionSheet.
/// After block has been executed, it is set to nil, breaking potential retain cycles.
@interface PSPDFActionSheet : UIActionSheet
/// @name Inititalization
/// Default initializer.
- (id)initWithTitle:(NSString *)title;
/// @name Adding Buttons
/// Adds a cancel button. Use only once.
- (void)setCancelButtonWithTitle:(NSString *) title block:(void (^)())block;
/// Adds a destructive button. Use only once.
- (void)setDestructiveButtonWithTitle:(NSString *) title block:(void (^)())block;
/// Add regular button.
- (void)addButtonWithTitle:(NSString *) title block:(void (^)())block;
/// @name Properties and destroy
/// Count the buttons.
- (NSUInteger)buttonCount;
/// Clears all blocks, breaks retain cycles. Automatically called once a button has been pressed.
- (void)destroy;
/// Call block when actionsheet gets dismissed.
- (void)setDestroyBlock:(void (^)())block;
@end