BBASMSlaveWebView.h
1.2 KB
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
//
// BBASMSlaveWebView.h
// SWAN
//
// Created by baidu on 2018/5/22.
// Copyright © 2018年 baidu. All rights reserved.
//
#import <WebKit/WebKit.h>
/// 手百使用BDPWKWebView做网络拦截
#if __has_include(<BDPWKWebView/BDPWKWebView.h>)
#import <BDPWKWebView/BDPWKWebView.h>
#define INCLUDE_BDPWKWEBVIEW 1
#else
#define INCLUDE_BDPWKWEBVIEW 0
#endif
@class BBASMSlaveWebView;
@protocol BBASMSlaveWebViewTouchDelegate <NSObject>
@optional;
/**
* @brief 透传hitTest
*
* @param webView webView
* @param point point
* @param event event
* @param hitedView webView hitTest返回的view
*/
- (void)webView:(BBASMSlaveWebView *)webView
hitTest:(CGPoint)point
withEvent:(UIEvent *)event
hitedView:(UIView **)hitedView;
/**
* @brief childScrollView 被添加到了视图树中
*
* @param webView webView
* @param scrollView scrollView
*/
- (void)webView:(BBASMSlaveWebView *)webView
sameLayerComponentDidChangeScrollView:(UIScrollView *)scrollView;
@end
#if INCLUDE_BDPWKWEBVIEW
@interface BBASMSlaveWebView : BDPBASEWKWebView
#else
@interface BBASMSlaveWebView : WKWebView
#endif
/// 触摸事件代理
@property (nonatomic, weak) id<BBASMSlaveWebViewTouchDelegate> touchDelegate;
@end