单军华
2018-07-11 acdf41fa3b32b628d9d7bba1f975060567dad3d7
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//
//  RAlertView.h
//  RAlert
//
//  Created by roycms on 2016/10/11.
//  Copyright © 2016年 roycms. All rights reserved.
//
 
#import <UIKit/UIKit.h>
#import "Masonry.h"
#import "RRGB.h"
#import "TextHelper.h"
 
/**
 弹窗类型
 
 - SimpleAlert: 简单样式   无按钮
 - ConfirmAlert: 只有一个确认按钮的 弹窗样式
 - CancelAndConfirmAlert: 有两个按钮的弹窗样式
 */
typedef NS_ENUM(NSInteger,AlertStyle) {
    SimpleAlert = 0,
    ConfirmAlert,
    CancelAndConfirmAlert,
};
 
@interface RAlertView : UIView
 
/**
 init
 
 @param style style description
 @return return value description
 */
- (instancetype)initWithStyle:(AlertStyle)style;
 
/**
 Description
 
 @param style style description
 @param width width description
 @return return value description
 */
- (instancetype)initWithStyle:(AlertStyle)style width:(CGFloat)width;
 
/**
 销毁页面
 */
- (void)exit;
 
/**
 确认按钮 block
 */
@property (nonatomic, copy) void(^confirm)();
 
/**
 取消按钮 block
 */
@property (nonatomic, copy) void(^cancel)();
 
/**
 主题
 */
@property (nonatomic,assign)UIColor *theme;
 
/**
 弹窗 view
 */
@property(nonatomic,strong)UIView *mainView;
 
 
/**
 弹窗内容的View
 */
@property (nonatomic,strong)UIView *contentView;
 
/**
 头部的标题 label
 */
@property(nonatomic,strong)UILabel *headerTitleLabel;
 
/**
 弹窗内容 label
 */
@property(nonatomic,strong)UILabel *contentTextLabel;
 
/**
 关闭按钮 button
 
 */
@property(nonatomic,strong)UIButton *closedButton;
/**
 确认按钮 button
 */
@property(nonatomic,strong)UIButton *confirmButton;
 
/**
 取消按钮 button
 */
@property(nonatomic,strong)UIButton *cancelButton;
 
/**
 点击背景是否可关闭弹窗
 */
@property (nonatomic,assign)BOOL isClickBackgroundCloseWindow;
 
@end