UIView+DSEMExtension.h
1.96 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
//
// UIView+DSEMExtension.h
// BKProjectFramework
//
// Created by BIKE on 2018/7/11.
// Copyright © 2018年 BIKE. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <MBProgressHUD/MBProgressHUD.h>
#define DS_showMessage(msg) [DS_APP_KEY_WINDOW showMessage:msg]
@interface UIView (DSEMExtension)
#pragma mark - 附加属性
/**
x
*/
@property (nonatomic, assign) CGFloat x;
/**
y
*/
@property (nonatomic, assign) CGFloat y;
/**
width
*/
@property (nonatomic, assign) CGFloat width;
/**
height
*/
@property (nonatomic, assign) CGFloat height;
/**
origin
*/
@property (nonatomic, assign) CGPoint origin;
/**
size
*/
@property (nonatomic, assign) CGSize size;
/**
centerX
*/
@property (nonatomic, assign) CGFloat centerX;
/**
centerY
*/
@property (nonatomic, assign) CGFloat centerY;
#pragma mark - 查找Controller
/**
查找controller
@return UIViewController
*/
-(nullable UIViewController *)findViewController;
#pragma mark - 加载框
/**
显示加载框 (不可点击)
*/
-(nonnull MBProgressHUD*)showLoading;
/**
显示带提示加载框 (不可点击)
@param remind 提示
*/
-(void)showLoading:(nullable NSString*)remind;
/**
隐藏加载框 (不可点击)
*/
-(void)hideLoading;
/**
显示加载框 (可点击)
*/
-(nonnull MBProgressHUD*)showHUD;
/**
显示带提示加载框 (可点击)
@param remind 提示
*/
-(void)showHUD:(nullable NSString*)remind;
/**
隐藏加载框 (可点击)
*/
-(void)hideHUD;
#pragma mark - 提示框
/// 提示框
/// @param message 提示信息
-(void)showMessage:(nullable NSString *)message;
#pragma mark - 加入购物车动画
/**
加入购物车动画
@param frame 开始frame
@param targetFrame 结束frame
@param complete 完成
*/
-(void)addShopingCartAnimateWithbeginFrame:(CGRect)frame targetFrame:(CGRect)targetFrame complete:(nullable void (^)(void))complete;
#pragma mark - 截图
/**
截图
@return 截图
*/
-(nonnull UIImage *)getScreenshot;
@end