杨锴
2024-08-14 909e20941e45f8712c012db602034b47da0bfdb0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
//  FFRereshView.h
//  FFPage
//
//  Created by North on 2019/8/14.
//  Copyright © 2019 North. All rights reserved.
//
 
#import <UIKit/UIKit.h>
#import "FFPage.h"
 
typedef NS_ENUM(NSUInteger, FFRereshStatus) {
    
    FFRereshStatusNormal = 0, //普通状态
    FFRereshStatusPulling, //下拉或者上提
    FFRereshStatusWillBeginRefresh, //将要刷新
    FFRereshStatusRereshing, //正在刷新
    FFRereshStatusWillEndRefresh, //将要结束刷新
    FFRereshStatusNoMore //没有更多数据
};
 
typedef void(^FFRefreshBlock)(void);
 
 
@interface FFRereshView : UIView
 
@property (assign, nonatomic) FFRereshStatus status;
 
@property (assign, nonatomic) CGFloat percent;
 
@property (weak, nonatomic) UIScrollView * scrollView;
 
@property (assign, nonatomic) BOOL isFooter;
 
+ (instancetype)initWithRefreshBlock:(FFRefreshBlock)block;
 
+ (instancetype)initWithTarget:(id)target
                        action:(SEL)action;
 
- (void)setUpSubView;
 
- (CGFloat)refreshHeight;
 
- (void)statusUpdated;
 
- (void)percentUpdated;
 
 
/**
 开始刷新
 */
- (void)beginRefresh;
 
/**
 结束刷新
 */
- (void)endRefresh;
 
 
@end