杨锴
2025-04-16 09a372bc45fde16fd42257ab6f78b8deeecf720b
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//
//  FFHomePageViewController.h
//  FFPage
//
//  Created by North on 2019/8/9.
//  Copyright © 2019 North. All rights reserved.
//
 
#import <UIKit/UIKit.h>
#import "FFPage.h"
#import "FFPageProtocol.h"
 
typedef NS_ENUM(NSUInteger, FFPageStyle) {
    
    FFPageStyleHeadEnlarge = 0, //头部放大
    FFPageStyleHeadRefresh, //头部整体刷新
    FFPageStyleSubRefresh //子控制器刷新 默认
};
 
 
 
@interface FFAdapterViewController
: UIViewController
 
/**
 样式 默认头部放大
 */
@property (assign, nonatomic) FFPageStyle style;
 
/**
 忽略上方间距 如果需要躲避导航条 传导航条高度
 Tips:躲避导航条指视图跟导航条有重叠才传值
 */
@property (assign, nonatomic) CGFloat ignoreTopSpeace;
 
/**
 上方head高度
 */
@property (assign, nonatomic) CGFloat headHeight;
 
/**
 选项栏高度
 */
@property (assign, nonatomic) CGFloat menuHeight;
 
/**
 头部控制器
 */
@property (retain, nonatomic, nonnull) UIViewController *headViewController;
 
/**
 控制器  悬浮的就是这个控制器
 */
@property (retain, nonatomic, nonnull) UIViewController *menuViewController;
 
 
/**
 分页控制器
 */
@property (retain, nonatomic, nonnull) UIViewController *pageViewController;
 
 
/**
 可上下滚动的滚动视图
 */
@property (readonly, nonatomic) UIScrollView * _Nonnull scrollview;
 
 
/**
 更新当前控制器 这个控制器是下方pageViewController里面正在显示的那一个
 目的是获取滚动视图
 @param controller 实现FFPageProtocol的控制器
 */
- (void)updateCurrentController:(UIViewController<FFPageProtocol> * _Nonnull)controller;
 
 
/**
 刷新 headHeight/menuHeight之后 调用
 
 @param animation 是否动画
 @param completion 完成回调
 */
- (void)updateHeightWithAnimation:(BOOL)animation completion:(void(^_Nullable)(void))completion;
 
 
/**
  需要修改已经设置的控制器/视图时
  仅仅修改高度请调用reloadHeightWithAnimation
 */
- (void)reloadData;
 
 
@end