PLVFeedDataManager
Objective-C
@interface PLVFeedDataManager : NSObject
@property (nonatomic, strong, readonly) NSArray *currentData; // 当前数据的持有属性
/// 更新持有数据
- (void)refreshWithData:(NSArray *)data;
/// 增加更多数据
- (void)appendWithData:(NSArray *)data;
/// 读取一条数据
/// @param index 数据的位置
/// @return 返回读取到的数据,不存在返回nil
- (id)objectAtIndex:(NSInteger)index;
/// 增加一条数据
- (void)addObject:(id)object;
/// 移除所有数据
- (void)removeAll;
@end
Swift
class PLVFeedDataManager : NSObject
Undocumented
-
Undocumented
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSArray *currentDataSwift
var currentData: [Any] { get } -
更新持有数据
Declaration
Objective-C
- (void)refreshWithData:(nonnull NSArray *)data;Swift
func refresh(withData data: [Any]) -
增加更多数据
Declaration
Objective-C
- (void)appendWithData:(nonnull NSArray *)data;Swift
func append(withData data: [Any]) -
读取一条数据
Declaration
Objective-C
- (nonnull id)objectAtIndex:(NSInteger)index;Swift
func object(at index: Int) -> AnyParameters
index数据的位置
Return Value
返回读取到的数据,不存在返回nil
-
增加一条数据
Declaration
Objective-C
- (void)addObject:(nonnull id)object;Swift
func add(_ object: Any) -
移除所有数据
Declaration
Objective-C
- (void)removeAll;Swift
func removeAll()
View on GitHub
PLVFeedDataManager Class Reference