40 lines
914 B
Objective-C
40 lines
914 B
Objective-C
//
|
|
// XJBaseWebViewVC.h
|
|
// ScarHousekeeper
|
|
//
|
|
// Created by 张小万 on 2021/1/21.
|
|
//
|
|
|
|
#import <WebKit/WebKit.h>
|
|
#import <JavaScriptCore/JavaScriptCore.h>
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
typedef enum {
|
|
WkJSMessageTypeDefault = 0,
|
|
WkJSMessageTypeBack = 1,
|
|
}WkJSMessageType;
|
|
typedef enum {
|
|
RightDefaultType = 0,
|
|
RightCompleteType = 1,
|
|
}RightNavType;
|
|
|
|
@protocol WebJSExport <JSExport>
|
|
|
|
- (void)startFunction;
|
|
@end
|
|
|
|
@interface XJBaseWebViewVC : XJBaseViewController<UIAlertViewDelegate,WKNavigationDelegate, WKUIDelegate, WebJSExport, WKScriptMessageHandler>
|
|
|
|
@property (nonatomic, strong) NSString *webUrl;
|
|
@property (nonatomic, strong) NSString *webTitle;
|
|
@property (nonatomic, strong) JSContext *context;
|
|
@property (nonatomic, strong) WKWebView *wkWebView;
|
|
@property (nonatomic, assign) RightNavType rightType;
|
|
|
|
- (void)webViewRequest;
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|