@aks-dev/easyui 1.0.32 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/UpgradeModule.m +80 -1
- package/ios/assets/infor_colse_image.png +0 -0
- package/ios/assets/upgrade_bg.png +0 -0
- package/ios/libs/LEEAlert/LEEAlert.h +462 -0
- package/ios/libs/LEEAlert/LEEAlert.m +3823 -0
- package/ios/libs/LEEAlert/LEEAlertHelper.h +153 -0
- package/ios/libs/SDAutoLayout/SDAutoLayout.h +24 -0
- package/ios/libs/SDAutoLayout/UITableView+SDAutoTableViewCellHeight.h +169 -0
- package/ios/libs/SDAutoLayout/UITableView+SDAutoTableViewCellHeight.m +537 -0
- package/ios/libs/SDAutoLayout/UIView+SDAutoLayout.h +484 -0
- package/ios/libs/SDAutoLayout/UIView+SDAutoLayout.m +1812 -0
- package/ios/views/UpgradeView.h +23 -0
- package/ios/views/UpgradeView.m +172 -0
- package/package.json +1 -1
package/ios/UpgradeModule.m
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
#import "UpgradeModule.h"
|
|
9
|
-
|
|
9
|
+
#import <UIKit/UIKit.h>
|
|
10
|
+
#import "UpgradeView.h"
|
|
11
|
+
#import "LEEAlert.h"
|
|
10
12
|
@interface UpgradeModule ()
|
|
11
13
|
|
|
12
14
|
|
|
@@ -23,6 +25,8 @@
|
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
|
|
28
|
+
|
|
29
|
+
|
|
26
30
|
RCT_EXPORT_MODULE();
|
|
27
31
|
|
|
28
32
|
|
|
@@ -34,5 +38,80 @@ RCT_EXPORT_METHOD(getAppVersion:(RCTPromiseResolveBlock)resolve
|
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
|
|
41
|
+
RCT_EXPORT_METHOD(upgrade:(NSDictionary *)info
|
|
42
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
43
|
+
reject:(RCTPromiseRejectBlock)reject){//checkCode, desc
|
|
44
|
+
|
|
45
|
+
NSString * version = info[@"version"];
|
|
46
|
+
NSString * title = info[@"title"];
|
|
47
|
+
NSString * downloadUrl = info[@"downloadUrl"];
|
|
48
|
+
NSString * note = info[@"note"];
|
|
49
|
+
BOOL force = info[@"force"];
|
|
50
|
+
|
|
51
|
+
NSString *currentVersion = [self getLocalVersion];
|
|
52
|
+
NSComparisonResult result =[self buildVersion:currentVersion compareWithAppstoreVersion:version];
|
|
53
|
+
if( result== NSOrderedAscending){
|
|
54
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
55
|
+
CGFloat SCREEN_WIDTH = [UIScreen mainScreen].bounds.size.width;
|
|
56
|
+
UpgradeView *view = [[UpgradeView alloc] initWithTitle:title note:note force:force];
|
|
57
|
+
view.closeBlock = ^{
|
|
58
|
+
[LEEAlert closeWithCompletionBlock:nil];
|
|
59
|
+
};
|
|
60
|
+
view.settingBlock = ^{
|
|
61
|
+
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: [downloadUrl stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]] options:@{} completionHandler:nil];
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
[LEEAlert alert].config
|
|
65
|
+
.LeeMaxWidth(SCREEN_WIDTH-40)
|
|
66
|
+
.LeeCustomView(view)
|
|
67
|
+
.LeeHeaderInsets(UIEdgeInsetsMake(0, 0, 0, 0))
|
|
68
|
+
.LeeItemInsets(UIEdgeInsetsMake(0, 0, 0, 0))
|
|
69
|
+
#ifdef __IPHONE_13_0
|
|
70
|
+
.LeeUserInterfaceStyle(UIUserInterfaceStyleLight)
|
|
71
|
+
#endif
|
|
72
|
+
.LeeShow();
|
|
73
|
+
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
else if(result == NSOrderedDescending){
|
|
77
|
+
reject(@"error_app_upgrade",@"商城版本低于本地版本",NULL);
|
|
78
|
+
}else if(result == NSOrderedSame){
|
|
79
|
+
reject(@"error_app_upgrade",@"已是最新版本",NULL);
|
|
80
|
+
}else{
|
|
81
|
+
resolve(@"发现新版本")
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
版本比较
|
|
89
|
+
*/
|
|
90
|
+
-(NSComparisonResult)buildVersion:(NSString*)buildVersion compareWithAppstoreVersion:(NSString*)appStoreVersion{
|
|
91
|
+
NSArray* buildVersionNums = [buildVersion componentsSeparatedByString:@"."];
|
|
92
|
+
NSArray* appStoreVersionNums = [appStoreVersion componentsSeparatedByString:@"."];
|
|
93
|
+
for (NSInteger i=0; i<buildVersionNums.count; i++) {
|
|
94
|
+
NSInteger buildNum = [buildVersionNums[i] integerValue];
|
|
95
|
+
if(i<appStoreVersionNums.count){
|
|
96
|
+
NSInteger appStoreNum = [appStoreVersionNums[i] integerValue];
|
|
97
|
+
if(buildNum < appStoreNum){
|
|
98
|
+
return NSOrderedAscending;
|
|
99
|
+
}else if(buildNum>appStoreNum){
|
|
100
|
+
return NSOrderedDescending;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if(buildVersionNums.count > appStoreVersionNums.count){
|
|
106
|
+
return NSOrderedDescending;
|
|
107
|
+
}else if(buildVersionNums.count < appStoreVersionNums.count){
|
|
108
|
+
return NSOrderedAscending;
|
|
109
|
+
}
|
|
110
|
+
return NSOrderedSame;
|
|
111
|
+
}
|
|
112
|
+
|
|
37
113
|
|
|
114
|
+
+ (BOOL)requiresMainQueueSetup {
|
|
115
|
+
return YES;
|
|
116
|
+
}
|
|
38
117
|
@end
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @header LEEAlert.h
|
|
3
|
+
*
|
|
4
|
+
* ┌─┐ ┌───────┐ ┌───────┐ 帅™
|
|
5
|
+
* │ │ │ ┌─────┘ │ ┌─────┘
|
|
6
|
+
* │ │ │ └─────┐ │ └─────┐
|
|
7
|
+
* │ │ │ ┌─────┘ │ ┌─────┘
|
|
8
|
+
* │ └─────┐│ └─────┐ │ └─────┐
|
|
9
|
+
* └───────┘└───────┘ └───────┘
|
|
10
|
+
*
|
|
11
|
+
* @brief LEEAlert
|
|
12
|
+
*
|
|
13
|
+
* @author LEE
|
|
14
|
+
* @copyright Copyright © 2016 - 2020年 lee. All rights reserved.
|
|
15
|
+
* @version V1.4.3
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#import <Foundation/Foundation.h>
|
|
19
|
+
|
|
20
|
+
#import <UIKit/UIKit.h>
|
|
21
|
+
|
|
22
|
+
#import "LEEAlertHelper.h"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
*************************简要说明************************
|
|
27
|
+
|
|
28
|
+
Alert 初始化
|
|
29
|
+
在 AppDelegate 或 SceneDelegate 中设置主要Window
|
|
30
|
+
|
|
31
|
+
[LEEAlert configMainWindow:self.window];
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
Alert 使用方法
|
|
35
|
+
|
|
36
|
+
[LEEAlert alert].cofing.XXXXX.XXXXX.LeeShow();
|
|
37
|
+
|
|
38
|
+
ActionSheet 使用方法
|
|
39
|
+
|
|
40
|
+
[LEEAlert actionSheet].cofing.XXXXX.XXXXX.LeeShow();
|
|
41
|
+
|
|
42
|
+
特性:
|
|
43
|
+
- 支持alert类型与actionsheet类型
|
|
44
|
+
- 默认样式为Apple风格 可自定义其样式
|
|
45
|
+
- 支持自定义标题与内容 可动态调整其样式
|
|
46
|
+
- 支持自定义视图添加 同时可设置位置类型等 自定义视图size改变时会自动适应.
|
|
47
|
+
- 支持输入框添加 自动处理键盘相关的细节
|
|
48
|
+
- 支持屏幕旋转适应 同时可自定义横竖屏最大宽度和高度
|
|
49
|
+
- 支持自定义action添加 可动态调整其样式
|
|
50
|
+
- 支持内部添加的功能项的间距范围设置等
|
|
51
|
+
- 支持圆角设置 支持阴影效果设置
|
|
52
|
+
- 支持队列和优先级 多个同时显示时根据优先级顺序排队弹出 添加到队列的如被高优先级覆盖 以后还会继续显示.
|
|
53
|
+
- 支持两种背景样式 1.半透明 (支持自定义透明度比例和颜色) 2.毛玻璃 (支持效果类型)
|
|
54
|
+
- 支持自定义UIView动画方法
|
|
55
|
+
- 支持自定义打开关闭动画样式(动画方向 渐变过渡 缩放过渡等)
|
|
56
|
+
- 支持iOS13 Dark样式
|
|
57
|
+
- 更多特性未来版本中将不断更新.
|
|
58
|
+
|
|
59
|
+
设置方法结束后在最后请不要忘记使用.LeeShow()方法来显示.
|
|
60
|
+
|
|
61
|
+
最低支持iOS8及以上
|
|
62
|
+
|
|
63
|
+
*****************************************************
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
67
|
+
|
|
68
|
+
@interface LEEAlert : NSObject
|
|
69
|
+
|
|
70
|
+
/** 初始化 */
|
|
71
|
+
|
|
72
|
+
+ (nonnull LEEAlertConfig *)alert;
|
|
73
|
+
|
|
74
|
+
+ (nonnull LEEActionSheetConfig *)actionsheet;
|
|
75
|
+
|
|
76
|
+
/** 获取Alert窗口 */
|
|
77
|
+
+ (nonnull LEEAlertWindow *)getAlertWindow;
|
|
78
|
+
|
|
79
|
+
/** 设置主窗口 ⚠️ 必须设置 iOS13 UISecene */
|
|
80
|
+
+ (void)configMainWindow:(UIWindow *)window;
|
|
81
|
+
|
|
82
|
+
/** 继续队列显示 */
|
|
83
|
+
+ (void)continueQueueDisplay;
|
|
84
|
+
|
|
85
|
+
/** 清空队列 */
|
|
86
|
+
+ (void)clearQueue;
|
|
87
|
+
|
|
88
|
+
/** 队列是否为空 */
|
|
89
|
+
+ (BOOL)isQueueEmpty;
|
|
90
|
+
|
|
91
|
+
/// 查询队列中是否包含某一标识
|
|
92
|
+
/// @param identifier 标识
|
|
93
|
+
+ (BOOL)containsQueueWithIdentifier:(NSString *)identifier;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
关闭指定标识
|
|
97
|
+
|
|
98
|
+
@param identifier 标识
|
|
99
|
+
@param completionBlock 关闭完成回调
|
|
100
|
+
*/
|
|
101
|
+
+ (void)closeWithIdentifier:(NSString *)identifier completionBlock:(void (^ _Nullable)(void))completionBlock;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
关闭指定标识
|
|
105
|
+
|
|
106
|
+
@param identifier 标识
|
|
107
|
+
@param force 是否强制关闭
|
|
108
|
+
@param completionBlock 关闭完成回调
|
|
109
|
+
*/
|
|
110
|
+
+ (void)closeWithIdentifier:(NSString *)identifier force:(BOOL)force completionBlock:(void (^ _Nullable)(void))completionBlock;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
关闭当前
|
|
114
|
+
|
|
115
|
+
@param completionBlock 关闭完成回调
|
|
116
|
+
*/
|
|
117
|
+
+ (void)closeWithCompletionBlock:(void (^ _Nullable)(void))completionBlock;
|
|
118
|
+
|
|
119
|
+
@end
|
|
120
|
+
|
|
121
|
+
@interface LEEBaseConfigModel : NSObject
|
|
122
|
+
|
|
123
|
+
/** ✨通用设置 */
|
|
124
|
+
|
|
125
|
+
/** 设置 标题 -> 格式: .LeeTitle(@@"") */
|
|
126
|
+
@property (nonatomic , copy , readonly ) LEEConfigToString LeeTitle;
|
|
127
|
+
|
|
128
|
+
/** 设置 内容 -> 格式: .LeeContent(@@"") */
|
|
129
|
+
@property (nonatomic , copy , readonly ) LEEConfigToString LeeContent;
|
|
130
|
+
|
|
131
|
+
/** 设置 自定义视图 -> 格式: .LeeCustomView(UIView) */
|
|
132
|
+
@property (nonatomic , copy , readonly ) LEEConfigToView LeeCustomView;
|
|
133
|
+
|
|
134
|
+
/** 设置 动作 -> 格式: .LeeAction(@"name" , ^{ //code.. }) */
|
|
135
|
+
@property (nonatomic , copy , readonly ) LEEConfigToStringAndBlock LeeAction;
|
|
136
|
+
|
|
137
|
+
/** 设置 取消动作 -> 格式: .LeeCancelAction(@"name" , ^{ //code.. }) */
|
|
138
|
+
@property (nonatomic , copy , readonly ) LEEConfigToStringAndBlock LeeCancelAction;
|
|
139
|
+
|
|
140
|
+
/** 设置 取消动作 -> 格式: .LeeDestructiveAction(@"name" , ^{ //code.. }) */
|
|
141
|
+
@property (nonatomic , copy , readonly ) LEEConfigToStringAndBlock LeeDestructiveAction;
|
|
142
|
+
|
|
143
|
+
/** 设置 添加标题 -> 格式: .LeeConfigTitle(^(UILabel *label){ //code.. }) */
|
|
144
|
+
@property (nonatomic , copy , readonly ) LEEConfigToConfigLabel LeeAddTitle;
|
|
145
|
+
|
|
146
|
+
/** 设置 添加内容 -> 格式: .LeeConfigContent(^(UILabel *label){ //code.. }) */
|
|
147
|
+
@property (nonatomic , copy , readonly ) LEEConfigToConfigLabel LeeAddContent;
|
|
148
|
+
|
|
149
|
+
/** 设置 添加自定义视图 -> 格式: .LeeAddCustomView(^(LEECustomView *){ //code.. }) */
|
|
150
|
+
@property (nonatomic , copy , readonly ) LEEConfigToCustomView LeeAddCustomView;
|
|
151
|
+
|
|
152
|
+
/** 设置 添加一项 -> 格式: .LeeAddItem(^(LEEItem *){ //code.. }) */
|
|
153
|
+
@property (nonatomic , copy , readonly ) LEEConfigToItem LeeAddItem;
|
|
154
|
+
|
|
155
|
+
/** 设置 添加动作 -> 格式: .LeeAddAction(^(LEEAction *){ //code.. }) */
|
|
156
|
+
@property (nonatomic , copy , readonly ) LEEConfigToAction LeeAddAction;
|
|
157
|
+
|
|
158
|
+
/** 设置 头部内的间距 -> 格式: .LeeHeaderInsets(UIEdgeInsetsMake(20, 20, 20, 20)) */
|
|
159
|
+
@property (nonatomic , copy , readonly ) LEEConfigToEdgeInsets LeeHeaderInsets;
|
|
160
|
+
|
|
161
|
+
/** 设置 上一项的间距 (在它之前添加的项的间距) -> 格式: .LeeItemInsets(UIEdgeInsetsMake(5, 0, 5, 0)) */
|
|
162
|
+
@property (nonatomic , copy , readonly ) LEEConfigToEdgeInsets LeeItemInsets;
|
|
163
|
+
|
|
164
|
+
/** 设置 最大宽度 -> 格式: .LeeMaxWidth(280.0f) */
|
|
165
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloat LeeMaxWidth;
|
|
166
|
+
|
|
167
|
+
/** 设置 最大高度 -> 格式: .LeeMaxHeight(400.0f) */
|
|
168
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloat LeeMaxHeight;
|
|
169
|
+
|
|
170
|
+
/** 设置 设置最大宽度 -> 格式: .LeeConfigMaxWidth(CGFloat(^)(^CGFloat(LEEScreenOrientationType type) { return 280.0f; }) */
|
|
171
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloatBlock LeeConfigMaxWidth;
|
|
172
|
+
|
|
173
|
+
/** 设置 设置最大高度 -> 格式: .LeeConfigMaxHeight(CGFloat(^)(^CGFloat(LEEScreenOrientationType type) { return 600.0f; }) */
|
|
174
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloatBlock LeeConfigMaxHeight;
|
|
175
|
+
|
|
176
|
+
/** 设置 圆角半径 -> 格式: .LeeCornerRadius(13.0f) */
|
|
177
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloat LeeCornerRadius;
|
|
178
|
+
|
|
179
|
+
/** 设置 圆角半径 -> 格式: .LeeCornerRadii(CornerRadiiMake(13.0f, 13.0f, 13.0f, 13.0f)) 注意: 该方法优先级高于LeeCornerRadius */
|
|
180
|
+
@property (nonatomic , copy , readonly ) LEEConfigToCornerRadii LeeCornerRadii;
|
|
181
|
+
|
|
182
|
+
/** 设置 开启动画时长 -> 格式: .LeeOpenAnimationDuration(0.3f) */
|
|
183
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloat LeeOpenAnimationDuration;
|
|
184
|
+
|
|
185
|
+
/** 设置 关闭动画时长 -> 格式: .LeeCloseAnimationDuration(0.2f) */
|
|
186
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloat LeeCloseAnimationDuration;
|
|
187
|
+
|
|
188
|
+
/** 设置 颜色 -> 格式: .LeeHeaderColor(UIColor) */
|
|
189
|
+
@property (nonatomic , copy , readonly ) LEEConfigToColor LeeHeaderColor;
|
|
190
|
+
|
|
191
|
+
/** 设置 背景颜色 -> 格式: .LeeBackGroundColor(UIColor) */
|
|
192
|
+
@property (nonatomic , copy , readonly ) LEEConfigToColor LeeBackGroundColor;
|
|
193
|
+
|
|
194
|
+
/** 设置 半透明背景样式及透明度 [默认] -> 格式: .LeeBackgroundStyleTranslucent(0.45f) */
|
|
195
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloat LeeBackgroundStyleTranslucent;
|
|
196
|
+
|
|
197
|
+
/** 设置 模糊背景样式及类型 -> 格式: .LeeBackgroundStyleBlur(UIBlurEffectStyleDark) */
|
|
198
|
+
@property (nonatomic , copy , readonly ) LEEConfigToBlurEffectStyle LeeBackgroundStyleBlur;
|
|
199
|
+
|
|
200
|
+
/** 设置 点击头部关闭 -> 格式: .LeeClickHeaderClose(YES) */
|
|
201
|
+
@property (nonatomic , copy , readonly ) LEEConfigToBool LeeClickHeaderClose;
|
|
202
|
+
|
|
203
|
+
/** 设置 点击背景关闭 -> 格式: .LeeClickBackgroundClose(YES) */
|
|
204
|
+
@property (nonatomic , copy , readonly ) LEEConfigToBool LeeClickBackgroundClose;
|
|
205
|
+
|
|
206
|
+
/** 设置 是否可滑动 -> 格式: .LeeIsScrollEnabled(YES) */
|
|
207
|
+
@property (nonatomic , copy , readonly ) LEEConfigToBool LeeIsScrollEnabled;
|
|
208
|
+
|
|
209
|
+
/** 设置 阴影偏移 -> 格式: .LeeShadowOffset(CGSizeMake(0.0f, 2.0f)) */
|
|
210
|
+
@property (nonatomic , copy , readonly ) LEEConfigToSize LeeShadowOffset;
|
|
211
|
+
|
|
212
|
+
/** 设置 阴影不透明度 -> 格式: .LeeShadowOpacity(0.3f) */
|
|
213
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloat LeeShadowOpacity;
|
|
214
|
+
|
|
215
|
+
/** 设置 阴影半径 -> 格式: .LeeShadowRadius(5.0f) */
|
|
216
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloat LeeShadowRadius;
|
|
217
|
+
|
|
218
|
+
/** 设置 阴影颜色 -> 格式: .LeeShadowOpacity(UIColor) */
|
|
219
|
+
@property (nonatomic , copy , readonly ) LEEConfigToColor LeeShadowColor;
|
|
220
|
+
|
|
221
|
+
/** 设置 标识 -> 格式: .LeeIdentifier(@@"ident") */
|
|
222
|
+
@property (nonatomic , copy , readonly ) LEEConfigToString LeeIdentifier;
|
|
223
|
+
|
|
224
|
+
/** 设置 是否加入到队列 -> 格式: .LeeQueue(YES) */
|
|
225
|
+
@property (nonatomic , copy , readonly ) LEEConfigToBool LeeQueue;
|
|
226
|
+
|
|
227
|
+
/** 设置 优先级 -> 格式: .LeePriority(1000) */
|
|
228
|
+
@property (nonatomic , copy , readonly ) LEEConfigToInteger LeePriority;
|
|
229
|
+
|
|
230
|
+
/** 设置 是否继续队列显示 -> 格式: .LeeContinueQueue(YES) */
|
|
231
|
+
@property (nonatomic , copy , readonly ) LEEConfigToBool LeeContinueQueueDisplay;
|
|
232
|
+
|
|
233
|
+
/** 设置 window等级 -> 格式: .LeeWindowLevel(UIWindowLevel) */
|
|
234
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloat LeeWindowLevel;
|
|
235
|
+
|
|
236
|
+
/** 设置 是否支持自动旋转 -> 格式: .LeeShouldAutorotate(YES) */
|
|
237
|
+
@property (nonatomic , copy , readonly ) LEEConfigToBool LeeShouldAutorotate;
|
|
238
|
+
|
|
239
|
+
/** 设置 是否支持显示方向 -> 格式: .LeeShouldAutorotate(UIInterfaceOrientationMaskAll) */
|
|
240
|
+
@property (nonatomic , copy , readonly ) LEEConfigToInterfaceOrientationMask LeeSupportedInterfaceOrientations;
|
|
241
|
+
|
|
242
|
+
/** 设置 打开动画配置 -> 格式: .LeeOpenAnimationConfig(^(void (^animatingBlock)(void), void (^animatedBlock)(void)) { //code.. }) */
|
|
243
|
+
@property (nonatomic , copy , readonly ) LEEConfigToBlockAndBlock LeeOpenAnimationConfig;
|
|
244
|
+
|
|
245
|
+
/** 设置 关闭动画配置 -> 格式: .LeeCloseAnimationConfig(^(void (^animatingBlock)(void), void (^animatedBlock)(void)) { //code.. }) */
|
|
246
|
+
@property (nonatomic , copy , readonly ) LEEConfigToBlockAndBlock LeeCloseAnimationConfig;
|
|
247
|
+
|
|
248
|
+
/** 设置 打开动画样式 -> 格式: .LeeOpenAnimationStyle() */
|
|
249
|
+
@property (nonatomic , copy , readonly ) LEEConfigToAnimationStyle LeeOpenAnimationStyle;
|
|
250
|
+
|
|
251
|
+
/** 设置 关闭动画样式 -> 格式: .LeeCloseAnimationStyle() */
|
|
252
|
+
@property (nonatomic , copy , readonly ) LEEConfigToAnimationStyle LeeCloseAnimationStyle;
|
|
253
|
+
|
|
254
|
+
/** 设置 状态栏样式 -> 格式: .LeeStatusBarStyle(UIStatusBarStyleDefault) */
|
|
255
|
+
@property (nonatomic , copy , readonly ) LEEConfigToStatusBarStyle LeeStatusBarStyle;
|
|
256
|
+
|
|
257
|
+
/** 设置 系统界面样式 -> 格式: .LeeUserInterfaceStyle(UIUserInterfaceStyleUnspecified) */
|
|
258
|
+
@property (nonatomic , copy , readonly ) LEEConfigToUserInterfaceStyle LeeUserInterfaceStyle API_AVAILABLE(ios(13.0), tvos(13.0));
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
/** 显示 -> 格式: .LeeShow() */
|
|
262
|
+
@property (nonatomic , copy , readonly ) LEEConfig LeeShow;
|
|
263
|
+
|
|
264
|
+
/** 设置 是否可以关闭 -> 格式: .leeShouldClose(^{ return YES; }) */
|
|
265
|
+
@property (nonatomic, copy, readonly ) LEEConfigToBlockReturnBool leeShouldClose;
|
|
266
|
+
|
|
267
|
+
/** 设置 是否可以关闭(Action 点击) -> 格式: .leeShouldActionClickClose(^(NSInteger index){ return YES; }) */
|
|
268
|
+
@property (nonatomic, copy, readonly ) LEEConfigToBlockIntegerReturnBool leeShouldActionClickClose;
|
|
269
|
+
|
|
270
|
+
/** 设置 当前关闭回调 -> 格式: .LeeCloseComplete(^{ //code.. }) */
|
|
271
|
+
@property (nonatomic , copy , readonly ) LEEConfigToBlock LeeCloseComplete;
|
|
272
|
+
|
|
273
|
+
@end
|
|
274
|
+
|
|
275
|
+
@interface LEEBaseConfigModel(Alert)
|
|
276
|
+
|
|
277
|
+
/** 设置 添加输入框 -> 格式: .LeeAddTextField(^(UITextField *){ //code.. }) */
|
|
278
|
+
@property (nonatomic , copy , readonly ) LEEConfigToConfigTextField LeeAddTextField;
|
|
279
|
+
|
|
280
|
+
/** 设置 中心点偏移 -> 格式: .LeeCenterOffset(CGPointMake(0, 0)) */
|
|
281
|
+
@property (nonatomic , copy , readonly ) LEEConfigToPoint LeeAlertCenterOffset;
|
|
282
|
+
|
|
283
|
+
/** 设置 是否闪避键盘 -> 格式: .LeeAvoidKeyboard(YES) */
|
|
284
|
+
@property (nonatomic , copy , readonly ) LEEConfigToBool LeeAvoidKeyboard;
|
|
285
|
+
|
|
286
|
+
@end
|
|
287
|
+
|
|
288
|
+
@interface LEEBaseConfigModel(ActionSheet)
|
|
289
|
+
|
|
290
|
+
/** 设置 ActionSheet头部的圆角半径 -> 格式: .LeeActionSheetHeaderCornerRadii(CornerRadiiMake(13.0f, 13.0f, 13.0f, 13.0f)) */
|
|
291
|
+
@property (nonatomic , copy , readonly ) LEEConfigToCornerRadii LeeActionSheetHeaderCornerRadii;
|
|
292
|
+
|
|
293
|
+
/** 设置 ActionSheet取消按钮的圆角半径 -> 格式: .LeeActionSheetCancelActionCornerRadii(CornerRadiiMake(13.0f, 13.0f, 13.0f, 13.0f)) */
|
|
294
|
+
@property (nonatomic , copy , readonly ) LEEConfigToCornerRadii LeeActionSheetCancelActionCornerRadii;
|
|
295
|
+
|
|
296
|
+
/** 设置 ActionSheet的背景视图颜色 -> 格式: .LeeActionSheetBackgroundColor(UIColor) */
|
|
297
|
+
@property (nonatomic , copy , readonly ) LEEConfigToColor LeeActionSheetBackgroundColor;
|
|
298
|
+
|
|
299
|
+
/** 设置 取消动作的间隔宽度 -> 格式: .LeeActionSheetCancelActionSpaceWidth(10.0f) */
|
|
300
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloat LeeActionSheetCancelActionSpaceWidth;
|
|
301
|
+
|
|
302
|
+
/** 设置 取消动作的间隔颜色 -> 格式: .LeeActionSheetCancelActionSpaceColor(UIColor) */
|
|
303
|
+
@property (nonatomic , copy , readonly ) LEEConfigToColor LeeActionSheetCancelActionSpaceColor;
|
|
304
|
+
|
|
305
|
+
/** 设置 ActionSheet距离屏幕底部的间距 -> 格式: .LeeActionSheetBottomMargin(10.0f) */
|
|
306
|
+
@property (nonatomic , copy , readonly ) LEEConfigToFloat LeeActionSheetBottomMargin;
|
|
307
|
+
|
|
308
|
+
@end
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
@interface LEEItem : NSObject
|
|
312
|
+
|
|
313
|
+
/** item类型 */
|
|
314
|
+
@property (nonatomic , assign ) LEEItemType type;
|
|
315
|
+
|
|
316
|
+
/** item间距范围 */
|
|
317
|
+
@property (nonatomic , assign ) UIEdgeInsets insets;
|
|
318
|
+
|
|
319
|
+
/** item设置视图Block */
|
|
320
|
+
@property (nonatomic , copy ) void (^block)(id view);
|
|
321
|
+
|
|
322
|
+
- (void)update;
|
|
323
|
+
|
|
324
|
+
@end
|
|
325
|
+
|
|
326
|
+
@interface LEEAction : NSObject
|
|
327
|
+
|
|
328
|
+
/** action类型 */
|
|
329
|
+
@property (nonatomic , assign ) LEEActionType type;
|
|
330
|
+
|
|
331
|
+
/** action标题 */
|
|
332
|
+
@property (nonatomic , strong ) NSString *title;
|
|
333
|
+
|
|
334
|
+
/** action高亮标题 */
|
|
335
|
+
@property (nonatomic , strong ) NSString *highlight;
|
|
336
|
+
|
|
337
|
+
/** action标题(attributed) */
|
|
338
|
+
@property (nonatomic , strong ) NSAttributedString *attributedTitle;
|
|
339
|
+
|
|
340
|
+
/** action高亮标题(attributed) */
|
|
341
|
+
@property (nonatomic , strong ) NSAttributedString *attributedHighlight;
|
|
342
|
+
|
|
343
|
+
/** action标题行数 默认为: 1 */
|
|
344
|
+
@property (nonatomic , assign ) NSInteger numberOfLines;
|
|
345
|
+
|
|
346
|
+
/** action标题对齐方式 默认为: NSTextAlignmentLeft */
|
|
347
|
+
@property (nonatomic , assign ) NSTextAlignment textAlignment;
|
|
348
|
+
|
|
349
|
+
/** action字体 */
|
|
350
|
+
@property (nonatomic , strong ) UIFont *font;
|
|
351
|
+
|
|
352
|
+
/** action字体大小随宽度变化 默认为: NO */
|
|
353
|
+
@property (nonatomic , assign ) BOOL adjustsFontSizeToFitWidth;
|
|
354
|
+
|
|
355
|
+
/** action断行模式 默认为: NSLineBreakByTruncatingMiddle */
|
|
356
|
+
@property (nonatomic , assign ) NSLineBreakMode lineBreakMode;
|
|
357
|
+
|
|
358
|
+
/** action标题颜色 */
|
|
359
|
+
@property (nonatomic , strong ) UIColor *titleColor;
|
|
360
|
+
|
|
361
|
+
/** action高亮标题颜色 */
|
|
362
|
+
@property (nonatomic , strong ) UIColor *highlightColor;
|
|
363
|
+
|
|
364
|
+
/** action背景颜色 (与 backgroundImage 相同) */
|
|
365
|
+
@property (nonatomic , strong ) UIColor *backgroundColor;
|
|
366
|
+
|
|
367
|
+
/** action高亮背景颜色 */
|
|
368
|
+
@property (nonatomic , strong ) UIColor *backgroundHighlightColor;
|
|
369
|
+
|
|
370
|
+
/** action背景图片 (与 backgroundColor 相同) */
|
|
371
|
+
@property (nonatomic , strong ) UIImage *backgroundImage;
|
|
372
|
+
|
|
373
|
+
/** action高亮背景图片 */
|
|
374
|
+
@property (nonatomic , strong ) UIImage *backgroundHighlightImage;
|
|
375
|
+
|
|
376
|
+
/** action图片 */
|
|
377
|
+
@property (nonatomic , strong ) UIImage *image;
|
|
378
|
+
|
|
379
|
+
/** action高亮图片 */
|
|
380
|
+
@property (nonatomic , strong ) UIImage *highlightImage;
|
|
381
|
+
|
|
382
|
+
/** action间距范围 */
|
|
383
|
+
@property (nonatomic , assign ) UIEdgeInsets insets;
|
|
384
|
+
|
|
385
|
+
/** action图片的间距范围 */
|
|
386
|
+
@property (nonatomic , assign ) UIEdgeInsets imageEdgeInsets;
|
|
387
|
+
|
|
388
|
+
/** action标题的间距范围 */
|
|
389
|
+
@property (nonatomic , assign ) UIEdgeInsets titleEdgeInsets;
|
|
390
|
+
|
|
391
|
+
/** action圆角曲率 */
|
|
392
|
+
@property (nonatomic , assign ) CGFloat cornerRadius;
|
|
393
|
+
|
|
394
|
+
/** action高度 */
|
|
395
|
+
@property (nonatomic , assign ) CGFloat height;
|
|
396
|
+
|
|
397
|
+
/** action边框宽度 */
|
|
398
|
+
@property (nonatomic , assign ) CGFloat borderWidth;
|
|
399
|
+
|
|
400
|
+
/** action边框颜色 */
|
|
401
|
+
@property (nonatomic , strong ) UIColor *borderColor;
|
|
402
|
+
|
|
403
|
+
/** action边框位置 */
|
|
404
|
+
@property (nonatomic , assign ) LEEActionBorderPosition borderPosition;
|
|
405
|
+
|
|
406
|
+
/** action点击不关闭 (仅适用于默认类型) */
|
|
407
|
+
@property (nonatomic , assign ) BOOL isClickNotClose;
|
|
408
|
+
|
|
409
|
+
/** action点击事件回调Block */
|
|
410
|
+
@property (nonatomic , copy ) void (^ _Nullable clickBlock)(void);
|
|
411
|
+
|
|
412
|
+
- (void)update;
|
|
413
|
+
|
|
414
|
+
@end
|
|
415
|
+
|
|
416
|
+
@interface LEECustomView : NSObject
|
|
417
|
+
|
|
418
|
+
/** 自定义视图对象 */
|
|
419
|
+
@property (nonatomic , strong, nullable ) UIView *view;
|
|
420
|
+
|
|
421
|
+
/** 自定义视图位置类型 (默认为居中) */
|
|
422
|
+
@property (nonatomic , assign ) LEECustomViewPositionType positionType;
|
|
423
|
+
|
|
424
|
+
/** 是否自动适应宽度 (不支持 AutoLayout 布局的视图)*/
|
|
425
|
+
@property (nonatomic , assign ) BOOL isAutoWidth;
|
|
426
|
+
|
|
427
|
+
@end
|
|
428
|
+
|
|
429
|
+
@interface LEEBaseConfig : NSObject
|
|
430
|
+
|
|
431
|
+
@property (nonatomic , strong, nonnull ) LEEBaseConfigModel *config;
|
|
432
|
+
|
|
433
|
+
@end
|
|
434
|
+
|
|
435
|
+
@interface LEEAlertConfig : LEEBaseConfig
|
|
436
|
+
|
|
437
|
+
@end
|
|
438
|
+
|
|
439
|
+
@interface LEEActionSheetConfig : LEEBaseConfig
|
|
440
|
+
|
|
441
|
+
@end
|
|
442
|
+
|
|
443
|
+
@interface LEEAlertWindow : UIWindow @end
|
|
444
|
+
|
|
445
|
+
@interface LEEBaseViewController : UIViewController @end
|
|
446
|
+
|
|
447
|
+
@interface LEEAlertViewController : LEEBaseViewController @end
|
|
448
|
+
|
|
449
|
+
@interface LEEActionSheetViewController : LEEBaseViewController @end
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
@interface UIView (CornerRadii)
|
|
453
|
+
|
|
454
|
+
CornerRadii CornerRadiiMake(CGFloat topLeft, CGFloat topRight, CGFloat bottomLeft, CGFloat bottomRight);
|
|
455
|
+
|
|
456
|
+
CornerRadii CornerRadiiZero(void);
|
|
457
|
+
|
|
458
|
+
CornerRadii CornerRadiiNull(void);
|
|
459
|
+
|
|
460
|
+
@end
|
|
461
|
+
|
|
462
|
+
NS_ASSUME_NONNULL_END
|