47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
//
|
|
// EPMomentListView.h
|
|
// YuMi
|
|
//
|
|
// Created by AI on 2025-10-10.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class EPMomentAPISwiftHelper;
|
|
@class MomentsInfoModel;
|
|
|
|
/// 推荐/我的动态列表数据源类型
|
|
typedef NS_ENUM(NSInteger, EPMomentListSourceType) {
|
|
EPMomentListSourceTypeRecommend = 0,
|
|
EPMomentListSourceTypeMine = 1
|
|
};
|
|
|
|
/// 承载 Moments 列表与分页刷新的视图
|
|
@interface EPMomentListView : UIView
|
|
|
|
/// 当前数据源(外部可读)
|
|
@property (nonatomic, strong, readonly) NSArray *rawList;
|
|
|
|
/// 列表类型:推荐 / 我的
|
|
@property (nonatomic, assign) EPMomentListSourceType sourceType;
|
|
|
|
/// 外部可设置:当某一项被点击
|
|
@property (nonatomic, copy) void (^onSelectMoment)(NSInteger index);
|
|
|
|
/// 重新加载(刷新到第一页)
|
|
- (void)reloadFirstPage;
|
|
|
|
/// 使用本地数组模式显示动态(禁用分页加载)
|
|
/// @param dynamicInfo 本地动态数组
|
|
/// @param refreshCallback 下拉刷新回调(由外部重新获取数据)
|
|
- (void)loadWithDynamicInfo:(NSArray<MomentsInfoModel *> *)dynamicInfo
|
|
refreshCallback:(void(^)(void))refreshCallback;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|
|
|
|
|