Files
2021-02-07 11:24:08 +08:00

43 lines
1.2 KiB
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// UIView+TFEmptyView.h
// WXReader
//
// Created by 谢腾飞 on 2020/11/20.
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class TFEmptyView;
@interface UIView (TFEmptyView)
/**
* 空页面占位图控件
*/
@property (nonatomic ,strong) TFEmptyView *xtfei_emptyView;
#pragma Mark 使用下面的四个方法请将EmptyView 的 autoShowEmptyView 值置为NO
/**
* 一般用于开始请求网络时调用,xtfei_startLoading 调用时会暂时隐藏 emptyView
* 当调用 tf_endLoading 方法时,tf_endLoading 方法内部会根据当前的 tableView/collectionView 的 DataSource 来自动判断是否显示 emptyView
*/
- (void)xtfei_startLoading;
/**
* 在想要刷新 emptyView 状态时调用
* 注意: tf_endLoading 的调用时机,有刷新 UI 的地方要等到刷新 UI 的方法之后调用,
*/
- (void)xtfei_endLoading;
// 调用下面两个手动显隐的方法,不受DataSource的影响,单独设置显示与隐藏(前提是关闭autoShowEmptyView
/**
* 手动调用显示 emptyView
*/
- (void)xtfei_showEmptyView;
/**
* 手动调用隐藏 emptyView
*/
- (void)xtfei_hideEmptyView;
@end
NS_ASSUME_NONNULL_END