FWWebView
@interface FWWebView : WKWebView
WKWebView封装,默认实现进度条、JS弹窗、Cookie管理、自定义User-Agent等
-
默认跨WKWebView共享Cookie,切换用户时可重置processPool清空Cookie
Declaration
Objective-C
@property (class, nonatomic, strong) WKProcessPool *_Nonnull processPool;
-
事件代理,包含navigationDelegate和UIDelegate
Declaration
Objective-C
@property (nonatomic, weak, nullable) id<FWWebViewDelegate> delegate;
-
是否启用Cookie管理,默认NO未启用
Declaration
Objective-C
@property (nonatomic) BOOL cookieEnabled;
-
进度视图,默认trackTintColor为clear
Declaration
Objective-C
@property (nonatomic, readonly) UIProgressView *_Nonnull progressView;
-
是否允许打开通用链接,默认NO
Declaration
Objective-C
@property (nonatomic) BOOL allowsUniversalLinks;
-
网页请求,设置后会自动加载,支持NSString|NSURL|NSURLRequest。默认nil
Declaration
Objective-C
@property (nonatomic, strong, nullable) id webRequest;