-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUIAlertView+Block.h
43 lines (32 loc) · 1.3 KB
/
UIAlertView+Block.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
42
43
//
// UIAlertView+Block.h
// Test1217
//
// Created by gongliang on 14/12/24.
// Copyright (c) 2014年 GL. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIAlertView (Block) <UIAlertViewDelegate>
/**
* alerView Block
* eg:
* UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"yes or no"
* message:@"yes"
* delegate:nil
* cancelButtonTitle:@"cancel"
* otherButtonTitles:@"ok", nil];
* [alertView clickedButtonBlock:^(UIAlertView *alertView, NSInteger buttonIndex) {
*
* }];
* [alertView show];
*
* @param block
*/
- (void)clickedButtonBlock:(void(^)(UIAlertView *alertView, NSInteger buttonIndex))block;
- (void)cancelBlock:(void(^)(UIAlertView *alertView))block;
- (void)willPresentBlock:(void(^)(UIAlertView *alertView))block;
- (void)didPresentBlock:(void(^)(UIAlertView *alertView))block;
- (void)willDismissWithButtonIndexBlock:(void(^) (UIAlertView *alertView, NSInteger buttonIndex))block;
- (void)didDismissWithButtonIndexBlock:(void(^) (UIAlertView *alertView, NSInteger buttonIndex))block;
- (void)shouldEnableFirstOtherButton:(BOOL(^) (UIAlertView *alertView))block;
@end