forked from jivadevoe/UIAlertView-Blocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UIAlertView+Blocks.h
45 lines (33 loc) · 1.4 KB
/
UIAlertView+Blocks.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
44
45
//
// UIAlertView+Blocks.h
// Shibui
//
// Created by Jiva DeVoe on 12/28/10.
// Copyright 2010 Random Ideas, LLC. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "RIButtonItem.h"
@interface UIAlertView (Blocks)
-(id)initWithTitle:(NSString *)inTitle message:(NSString *)inMessage cancelButtonItem:(RIButtonItem *)inCancelButtonItem otherButtonItems:(RIButtonItem *)inOtherButtonItems, ... NS_REQUIRES_NIL_TERMINATION;
-(id)initWithTitle:(NSString *)inTitle message:(NSString *)inMessage cancelButtonItem:(RIButtonItem *)inCancelButtonItem otherButtonItemsArray:(NSArray *)inOtherButtonItemsArray;
- (NSInteger)addButtonItem:(RIButtonItem *)item;
#pragma mark convenience methods
/**
Shows simple alert with Ok button and text without title.
@param text message for UIAlertView.
*/
+ (void) simpleAlertWithText: (NSString*)text;
/**
Shows simple alert with Ok button, title and text.
@param title title for UIAlertView.
@param text message for UIAlertView.
*/
+ (void) simpleAlertWithTitle: (NSString*)title andText: (NSString*)text;
/**
Shows simple alert with Ok button, title and text. Performs block after Ok button tapped.
@param title title for UIAlertView.
@param text message for UIAlertView.
@param conpletionBlock Block to be performed after Ok button tapped.
*/
+ (void) simpleAlertWithTitle: (NSString*)title text: (NSString*)text completionBlock: (void(^)())completionBlock;
@end