JLChen
2021-05-18 a869383e163a18cdedcf587383c1eca043129754
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
123
124
125
126
127
128
129
130
131
//
//  Copyright (c) 2015年 Dahua. All rights reserved.
//
//  UIView扩展,用于界面添加提示图片和文字。提示展示方式主要是界面中间有一张图片和一段文字。
 
#import <UIKit/UIKit.h>
 
/**
 枚举:提示类型
 */
typedef NS_ENUM(NSInteger,TipsType) {
    TipsTypeNone,               //无提示
    TipsTypeDeviceShareNone,    //无设备共享
    TipsTypeMessageNone,        //无消息
    TipsTypeDeviceNone,         //无设备
    TipsTypeDeviceAPNone,       //无配件
    TipsTypeAlarmNone,          //无报警
    TipsTypeWifiNone,           //无Wifi
    TipsTypeCloudNone,          //无云存储套餐
    TipsTypeDeviceOffline,      //设备离线
    TipsTypeLiveListNone,       //无直播列表
    TipsTypeCommentListNone,    //无评论列表
    TipsTypeFail,               //获取失败
    TipsTypeNetError,           //网络异常
    TipsTypeUpdate,             //点击刷新
    TipsTypeNoVideoMsg,         //暂无留言
    TipsTypeNoVideotape,        //暂无录像
    TipsTypeNoAuthority,        //暂无权限
    TipsTypeNoSdCard,           //暂无SD卡
    TipsTypeNoCollection,       //暂无收藏点
    TipsTypeNoOneDayVideo,      //暂无精彩一天浓缩视频
    TipsTypeNoFriendMsg,        //暂无申请
    TipsTypeNoSearchResult,     //未搜索到设备
    TipsTypeVideoMsgNone,       //无视频留言
    TipsTypeDefault,
};
 
 
@interface UIScrollView(Tips)
 
/**
 *  给空视图页面做响应事件穿透按钮用
 */
@property (strong, nonatomic) UIButton *tapBtn;
@property (strong, nonatomic) UIImageView *tapImageView;
 
/**
 *  根据提示类型,添加提示界面
 *
 *  @param type 提示类型
 *
 *  @return UIView 提示界面
 */
- (void)lc_addTipsView:(TipsType)type;
 
 
/**
 *  移除提示界面
 */
- (void)lc_clearTipsView;
 
/**
 *  获取空白页提示图片
 *
 *  @param type 提示类型
 *
 *   @return 空白页
 */
- (UIView *)lc_getTipsView:(TipsType)type;
 
/**
 *  获取空白页提示图片
 *
 *  @param type 提示类型
 *
 *   @return 空白页,在原来空白页上调整了空白页图片的位置,防止遮挡
 */
- (void)lc_addTipsViewModifyFrame;
 
/*!
 *  @author peng_kongan, 16-02-19 13:02:54
 *
 *  @brief 在LeChange 中使用 根据UI标注 实现提示图片上下边距1:2 (Masonry)
 *
 *  @param imageName   图片名称
 *  @param description 提示信心
 */
- (void)lc_setEmyptImageName:(NSString *)imageName andDescription:(id )description;
 
/**
 整体显示如上,可进行整体界面点击,并回调
 */
- (void)lc_setEmyptImageName:(NSString *)imageName andDescription:(id )description ClickedBlock:(void(^)(void))block;
 
 
///在提示字符下面有按钮可以点击
- (void)lc_setEmyptImageName:(NSString *)imageName andDescription:(id )description andButtonTitle:(NSString *)buttonTitle withButtonClickedBlock:(void(^)(void))block;
 
/*!
*  @author lv_tongsheng, 20-04-09
*
*  @brief 根据UI标注 提示文字分为 title 和 description
*
*  @param imageName   图片名称
*  @param title 提示主文字
*  @param description 提示描述
*/
- (void)lc_setEmyptImageName:(NSString *)imageName emptyTitle:(NSString *)title emptyDescription:(NSString *)description;
 
/*!
*  @author jia_fangzhou, 20-04-16
*
*  @brief 设置空值图片,下方存在自定义view
*
*  @param imageName   图片名称
*  @param title 提示主文字
*  @param description 提示描述
*/
- (void)lc_setEmyptImageName:(NSString *)imageName emptyDescription:(NSString *)description customView:(UIView *)customView;
 
/**
 设置空值图片
 
 @param image 图片
 @param description 描述
 */
- (void)lc_setEmptyImage:(UIImage *)image description:(id)description;
 
- (void)lc_setEmyptImageName:(NSString *)imageName andDescription:(id )description userInteractionEnabled:(BOOL)enable;
 
@end