-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCBWPlaceHolderView.h
64 lines (49 loc) · 1.82 KB
/
CBWPlaceHolderView.h
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
//
// CBWPlaceHolderView.h
// CBWEmptyViewDemo
//
// Created by 陈博文 on 16/8/5.
// Copyright © 2016年 陈博文. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface CBWPlaceHolderView : UIView
+ (instancetype)showEmptyViewWithMessage:(NSString *)message inparentView:(UIView *)parentView;
/**
* 创建点击界面会动作的 HUD
*
* @param message HUD 的文字说明
* @param parentView 需要传进来父类View
* @param target 传进来的父类
* @param action 传进来的动作
*
* @return 创建的 HUD
*/
+ (instancetype)showEmptyViewWithMessage:(NSString *)message inparentView:(UIView *)parentView target:(id)target action:(SEL)action;
- (void)addButtonWithTitle:(NSString *)title target:(id)target action:(SEL)action;
- (void)dismiss;
#pragma mark - property
/** messageTextColor*/
@property (nonatomic ,strong) UIColor *messageTextColor;
/** messageFont*/
@property (nonatomic ,strong) UIFont *messageFont;
/** buttonBackgroundColor*/
@property (nonatomic ,strong) UIColor *buttonBackgroundColor;
/** buttonTitleColor*/
@property (nonatomic ,strong) UIColor *buttonTitleColor;
/** buttonTitleFont*/
@property (nonatomic ,strong) UIFont *buttonTitleFont;
/** 默认图片*/
@property (nonatomic,strong) UIImage *customImage;
/** 设置 gif 动画 */
@property (nonatomic) NSData *gifImageData;
/** 设置帧动画 */
@property (nonatomic,strong) NSArray *customAnimationImages;
/** 按钮标题-如果设置 buttonTitle 就会显示 button, 默认是没有显示的*/
@property (nonatomic ,strong) NSString *buttonTiltle;
/** 设置点击 block */
@property (nonatomic,copy) void(^ButtonClickedBlock)();
/** 回调对象 */
@property (weak, nonatomic) id buttonTarget;//这个一定要使用 weak, 否者会内存泄露
/** 回调方法 */
@property (assign, nonatomic) SEL buttonAction;
@end