UNICORN - iOS
CustomAlert.h
1 //
2 // CustomAlert.h
3 //
4 // Created by saimushi on 2015/05/25.
5 // Copyright (c) 2015 saimushi. All rights reserved.
6 //
7 #import <Foundation/Foundation.h>
8 #import <QuartzCore/QuartzCore.h>
9 #import <UIKIt/UIKit.h>
10 
11 typedef void(^AlertCompletionHandler)(BOOL ok);
12 
13 @interface UICustomAlertView : UIAlertView <UIAlertViewDelegate>
14 {
15  AlertCompletionHandler completionHandler;
16  BOOL singleButtonMode;
17 }
18 @property (strong, nonatomic) AlertCompletionHandler completionHandler;
19 @property (nonatomic) BOOL singleButtonMode;
20 @end
21 
22 
23 @interface CustomAlert : NSObject <UIAlertViewDelegate>
24 
25 // 単純にアラートを表示する(アラートからの戻り処理無しで良い場合)
26 + (void)alertShow:(NSString *)title message:(NSString *)message;
27 // アラート。戻り処理あり。(ハンドラー)
28 + (void)alertShow:(NSString *)title message:(NSString *)message buttonCenter:(NSString *)buttonCenter completionHandler:(AlertCompletionHandler)completionHandler;
29 // アラート。戻り処理あり。(ハンドラー)
30 + (void)alertShow:(NSString *)title message:(NSString *)message buttonLeft:(NSString *)buttonLeft buttonRight:(NSString *)buttonRight completionHandler:(AlertCompletionHandler)completionHandler;
31 
32 @end
Definition: CustomAlert.h:24
Definition: CustomAlert.h:13