forked from ryanmaxwell/RMUniversalAlert
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRMUniversalAlert.h
More file actions
41 lines (32 loc) · 1.77 KB
/
RMUniversalAlert.h
File metadata and controls
41 lines (32 loc) · 1.77 KB
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
//
// RMUniversalAlert.h
// RMUniversalAlert
//
// Created by Ryan Maxwell on 19/11/14.
// Copyright (c) 2014 Ryan Maxwell. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "RMPopoverPresentationController.h"
@class RMUniversalAlert;
typedef void(^RMUniversalAlertCompletionBlock)(RMUniversalAlert *alert, NSInteger buttonIndex);
@interface RMUniversalAlert : NSObject
+ (instancetype)showAlertInViewController:(UIViewController *)viewController
withTitle:(NSString *)title
message:(NSString *)message
cancelButtonTitle:(NSString *)cancelButtonTitle
destructiveButtonTitle:(NSString *)destructiveButtonTitle
otherButtonTitles:(NSArray *)otherButtonTitles
tapBlock:(RMUniversalAlertCompletionBlock)tapBlock;
+ (instancetype)showActionSheetInViewController:(UIViewController *)viewController
withTitle:(NSString *)title
message:(NSString *)message
cancelButtonTitle:(NSString *)cancelButtonTitle
destructiveButtonTitle:(NSString *)destructiveButtonTitle
otherButtonTitles:(NSArray *)otherButtonTitles
popoverPresentationControllerBlock:(void(^)(RMPopoverPresentationController *popover))popoverPresentationControllerBlock
tapBlock:(RMUniversalAlertCompletionBlock)tapBlock;
@property (readonly, nonatomic) BOOL visible;
@property (readonly, nonatomic) NSInteger cancelButtonIndex;
@property (readonly, nonatomic) NSInteger firstOtherButtonIndex;
@property (readonly, nonatomic) NSInteger destructiveButtonIndex;
@end