1.导入头文件
#import <WebKit/WebKit.h>
2.创建WKWebView和ProcessView, 并且添加观察着
@property (strong, nonatomic) WKWebView *webView;
@property (strong, nonatomic) UIProgressView *progressView;
- (void)viewDidLoad {
[super viewDidLoad];
_webView = [[WKWebView alloc] initWithFrame:self.view.bounds];
_webView.UIDelegate = self;
_webView.navigationDelegate = self;
[self.view addSubview:_webView];
_progressView = [[UIProgressView alloc]initWithFrame:CGRectMake(0, 65, CGRectGetWidth(self.view.frame),2)];
[self.view addSubview:_progressView];
[_webView addObserver:self forKeyPath:@&