forked from AliSoftware/OHAlertView-OHActionSheet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UIActionSheetEx.h
41 lines (32 loc) · 1.21 KB
/
UIActionSheetEx.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
//
// UIActionSheetEx.h
// FoodReporter
//
// Created by Olivier on 23/01/11.
// Copyright 2011 FoodReporter. All rights reserved.
//
#import <UIKit/UIKit.h>
#if NS_BLOCKS_AVAILABLE
@class UIActionSheetEx;
@interface UIActionSheetEx : UIActionSheet<UIActionSheetDelegate> {
@private
void (^_completionBlock)(UIActionSheetEx*,NSInteger);
}
/////////////////////////////////////////////////////////////////////////////
+(void)showSheetInView:(UIView*)view
title:(NSString*)title
cancelButtonTitle:(NSString *)cancelButtonTitle
destructiveButtonTitle:(NSString *)destructiveButtonTitle
otherButtonTitles:(NSArray *)otherButtonTitles
completion:(void (^)(UIActionSheetEx* sheet,NSInteger buttonIndex))completionBlock;
- (id)initWithTitle:(NSString*)title
cancelButtonTitle:(NSString *)cancelButtonTitle
destructiveButtonTitle:(NSString *)destructiveButtonTitle
otherButtonTitles:(NSArray *)otherButtonTitles
completion:(void (^)(UIActionSheetEx* sheet,NSInteger buttonIndex))completionBlock;
/////////////////////////////////////////////////////////////////////////////
@end
#else
#warning UIActionSheetEx uses blocks that are supported only since iOS 4.0
@interface UIActionSheetEx : UIActionSheet @end
#endif