-
Notifications
You must be signed in to change notification settings - Fork 0
/
MGWebTableView.h
52 lines (38 loc) · 1.14 KB
/
MGWebTableView.h
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
//
// MGWebTableView.h
// TNews
//
// Created by news365-macpro on 2018/7/16.
// Copyright © 2018年 Intelligent-earnings. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <WebKit/WebKit.h>
/*
结构如下:
headerView
|
webView
|
centerView
|
tableView
|
Footer
*/
@interface MGWebTableView : UIScrollView
@property(nonatomic, strong, readonly) UIView * contentView;
@property(nonatomic, strong, readonly) WKWebView * webView;
@property(nonatomic, strong, readonly) UITableView * tableView;
@property(nonatomic, strong) UIView * headerView;
@property(nonatomic, strong) UIView * centerView;
@property(nonatomic, strong) UIView * footerView;
// 用来控制webView 的最小高度
@property(nonatomic, assign) CGFloat webViewMinHeight;
@property(nonatomic, assign) CGFloat tableViewMinHeight;
// webView 和 tableView 不能为空
-(instancetype)initWithWebView:(WKWebView *)webView
tableView:(UITableView *)tableView
frame:(CGRect)frame;
// 设置view想要在self 中显示的位置, y 必须大于0
-(void)scrollView:(UIView *)view toOffsetY:(CGFloat)y animated:(BOOL)animated;
@end