44 lines
1.1 KiB
Objective-C
Executable File
44 lines
1.1 KiB
Objective-C
Executable File
//
|
|
// MTStatefulBaseView.h
|
|
// Meet
|
|
//
|
|
// Created by ko1o on 2018/10/26.
|
|
// Copyright © 2018年 ko1o. All rights reserved.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
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 <NSObject>
|
|
|
|
@optional
|
|
- (MTStatefulConfigItem *)statefulConfigItemForStatefulViewType:(MTStatefulViewType)statefulViewType;
|
|
|
|
@end
|
|
|
|
@interface MTStatefulBaseView : UIView
|
|
|
|
@property (nonatomic, assign,readonly) MTStatefulViewType statefulViewType;
|
|
|
|
- (instancetype)initWithFrame:(CGRect)frame type:(MTStatefulViewType)statefulViewType delegate:(id<MTStatefulBaseViewDelegate>)delegate;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|