// // KWMCollectionRefreshUtil.h // iCemarose // // Created by HouWeiBin on 2017/6/16. // Copyright © 2017年 kollway. All rights reserved. // // 这个工具类只支持简单的collection样式,如果有更复杂的需要,后面会进行调整。 #import <Foundation/Foundation.h> @class KWMCollectionRefreshUtil; @protocol KWMCollectionRefreshDelegate - (void)refreshUtil:(KWMCollectionRefreshUtil *)util onLoad:(NSInteger)page; @end @interface KWMCollectionRefreshUtil : NSObject @property (nonatomic, weak) id<KWMCollectionRefreshDelegate> delegate; @property (nonatomic, weak) UICollectionView *collectionView; @property (nonatomic, weak) UIView *emptyView; @property (nonatomic) NSString *emptyMsg; @property (nonatomic) NSString *imageName; @property (nonatomic) BOOL isShowEmptyImage; @property (nonatomic) NSMutableArray *lastResult; @property (nonatomic) NSMutableArray *dataList; @property (nonatomic) BOOL hasNextPage; @property (nonatomic) NSInteger page; @property (nonatomic, copy) BOOL (^dataFilter)(id data); @property (nonatomic) BOOL hideHeader; -(void)setRefreshNull; - (void)reLoadData; - (void)clearData; - (BOOL)isLoading; - (void)hideLoading; - (void)appendDataList:(NSArray *)result; - (BOOL)isReload; @end