forked from ryanmaxwell/RMUniversalAlert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RMUniversalAlert.h
41 lines (32 loc) · 2.04 KB
/
RMUniversalAlert.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
//
// 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 * __nonnull alert, NSInteger buttonIndex);
@interface RMUniversalAlert : NSObject
+ (nonnull instancetype)showAlertInViewController:(nonnull UIViewController *)viewController
withTitle:(nullable NSString *)title
message:(nullable NSString *)message
cancelButtonTitle:(nullable NSString *)cancelButtonTitle
destructiveButtonTitle:(nullable NSString *)destructiveButtonTitle
otherButtonTitles:(nullable NSArray *)otherButtonTitles
tapBlock:(nullable RMUniversalAlertCompletionBlock)tapBlock;
+ (nonnull instancetype)showActionSheetInViewController:(nonnull UIViewController *)viewController
withTitle:(nullable NSString *)title
message:(nullable NSString *)message
cancelButtonTitle:(nullable NSString *)cancelButtonTitle
destructiveButtonTitle:(nullable NSString *)destructiveButtonTitle
otherButtonTitles:(nullable NSArray *)otherButtonTitles
popoverPresentationControllerBlock:(void(^ __nullable)(RMPopoverPresentationController * __nonnull popover))popoverPresentationControllerBlock
tapBlock:(nullable RMUniversalAlertCompletionBlock)tapBlock;
@property (readonly, nonatomic) BOOL visible;
@property (readonly, nonatomic) NSInteger cancelButtonIndex;
@property (readonly, nonatomic) NSInteger firstOtherButtonIndex;
@property (readonly, nonatomic) NSInteger destructiveButtonIndex;
@end