12345678910111213141516171819202122232425262728293031323334353637 |
- //
- // UIView+ZYLEmptyView.h
- // mask
- //
- // Created by 翟玉磊 on 2018/12/9.
- // Copyright © 2018 翟玉磊. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import "ZYLEmptyDataView.h"
- NS_ASSUME_NONNULL_BEGIN
- @interface UIView (ZYLEmptyView)
- /// emptyDataView
- @property (nonatomic , readwrite , strong) ZYLEmptyDataView *emptyDataView;
- /**
- 无数据显示友好文本提示视图
- @param type 显示类型
- @param emptyInfo 无数据时提示文字信息,不传则为默认;前提是 hasData = NO && hasError = NO
- @param errorInfo 无数据且请求错误时提示文字信息,不传则为默认;前提是 hasData = NO && hasError = YES
- @param offsetTop 显示的图片的中心点Y值距离其父类视图的顶部的距离
- @param hasData 是否存在数据
- @param hasError 是否存在错误
- @param reloadBlock 如果有加载按钮点击的回调
- */
- - (void)zyl_configEmptyViewWithType:(ZYLEmptyDataViewType)type emptyInfo:(nullable NSString *)emptyInfo errorInfo:(nullable NSString *)errorInfo offsetTop:(CGFloat)offsetTop hasData:(BOOL)hasData hasError:(BOOL)hasError reloadBlock:(nullable void(^)(void))reloadBlock;
- - (void)zyl_configEmptyViewWithType:(ZYLEmptyDataViewType)type emptyInfo:(nullable NSString *)emptyInfo errorInfo:(nullable NSString *)errorInfo offsetTop:(CGFloat)offsetTop bgColor:(nullable UIColor *)bgColor hasData:(BOOL)hasData hasError:(BOOL)hasError reloadBlock:(nullable void(^)(void))reloadBlock;
- /// 可以设置空界面的Y轴高度
- - (void)zyl_configEmptyViewWithType:(ZYLEmptyDataViewType)type emptyInfo:(nullable NSString *)emptyInfo errorInfo:(nullable NSString *)errorInfo offsetTop:(CGFloat)offsetTop emptyDataViewTop:(CGFloat)emptyDataViewTop hasData:(BOOL)hasData hasError:(BOOL)hasError reloadBlock:(nullable void(^)(void))reloadBlock;
- @end
- NS_ASSUME_NONNULL_END
|