// // MTStatefulBaseView.h // Meet // // Created by ko1o on 2018/10/26. // Copyright © 2018年 ko1o. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, MTStatefulViewType) { MTStatefulViewTypeLoading = 1, MTStatefulViewTypeError, MTStatefulViewTypeEmpty, }; @class MTStatefulBaseView; @interface MTStatefulConfigItem : NSObject @property (assign,nonatomic) BOOL shouldShowErrorRefresh; //错误展示刷新按钮 @property (assign,nonatomic) BOOL shouldOnlyShowTitle; //状态只展示一个简单文本 @property (nonatomic,copy) NSString * statefulTitle; @property (nonatomic,copy) dispatch_block_t didClickedRefreshBlock; @end @protocol MTStatefulBaseViewDelegate @optional - (MTStatefulConfigItem *)statefulConfigItemForStatefulViewType:(MTStatefulViewType)statefulViewType; @end @interface MTStatefulBaseView : UIView @property (nonatomic, assign,readonly) MTStatefulViewType statefulViewType; - (instancetype)initWithFrame:(CGRect)frame type:(MTStatefulViewType)statefulViewType delegate:(id)delegate; @end NS_ASSUME_NONNULL_END