UNICORN - iOS
MMessages.h
1 //
2 // MMessages.h
3 // Version:1.0
4 //
5 // Created by saimushi on 2014/11/18.
6 // Copyright (c) 2014 saimushi. All rights reserved.
7 //
8 #import <UIKit/UIKit.h>
9 
10 //#define MMESSAGE_NOTIFY_BACKGROUND_COLOR [UIColor colorWithRed:0.60 green:1.00 blue:0.60 alpha:0.9f]
11 //#define MMESSAGE_WARNING_BACKGROUND_COLOR [UIColor colorWithRed:1.00 green:0.84 blue:0.00 alpha:0.9f]
12 //#define MMESSAGE_ERROR_BACKGROUND_COLOR [UIColor colorWithRed:1.00 green:0.00 blue:0.00 alpha:0.9f]
13 //#define MMESSAGE_NOTIFY_FONT_COLOR [UIColor whiteColor]
14 //#define MMESSAGE_WARRNING_FONT_COLOR [UIColor grayColor]
15 //#define MMESSAGE_ERROR_FONT_COLOR [UIColor whiteColor]
16 #define MMESSAGE_NOTIFY_BACKGROUND_COLOR [UIColor colorWithRed:0.67 green:0.84 blue:0.20 alpha:0.9f]
17 #define MMESSAGE_WARNING_BACKGROUND_COLOR [UIColor colorWithRed:1.00 green:0.56 blue:0.35 alpha:0.9f]
18 #define MMESSAGE_ERROR_BACKGROUND_COLOR [UIColor colorWithRed:0.97 green:0.39 blue:0.10 alpha:0.9f]
19 #define MMESSAGE_NOTIFY_FONT_COLOR [UIColor whiteColor]
20 #define MMESSAGE_WARRNING_FONT_COLOR [UIColor whiteColor]
21 #define MMESSAGE_ERROR_FONT_COLOR [UIColor whiteColor]
22 
23 #define DISPLAY_TIME 10.0f
24 
25 typedef void (^MMessagesCompletionBlock)(NSString *messageIdentifier);
26 typedef enum{
27  MMessageNotify,// 通常通知
28  MMessageWarrning,// 警告
29  MMessageError,// 異常
30 } MMessageType;
31 
32 @interface MMessages : UIView
33 {
34  MMessagesCompletionBlock completionBlock;
35  NSMutableDictionary *messages;
36 }
37 
38 @property (strong, nonatomic) MMessagesCompletionBlock completionBlock;
39 @property (strong, nonatomic) NSMutableDictionary *messages;
40 
41 + (void)showMessage:(NSString *)argMessageID :(NSString *)argMessage :(MMessageType)argMessageType :(NSString *)argScheme completion:(MMessagesCompletionBlock)argCompletion;
42 
43 @end
Definition: MMessages.h:32