You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
42 lines
1.2 KiB
// |
|
// 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
|
|
|