|
|
@@ -55,6 +55,9 @@ static NSString *const CHANNEL_NAME = @"flutter_webview_plugin";
|
|
|
} else if ([@"hide" isEqualToString:call.method]) {
|
|
|
[self hide];
|
|
|
result(nil);
|
|
|
+ } else if ([@"stopLoading" isEqualToString:call.method]) {
|
|
|
+ [self stopLoading];
|
|
|
+ result(nil);
|
|
|
} else {
|
|
|
result(FlutterMethodNotImplemented);
|
|
|
}
|
|
|
@@ -177,6 +180,11 @@ static NSString *const CHANNEL_NAME = @"flutter_webview_plugin";
|
|
|
self.webview.hidden = true;
|
|
|
}
|
|
|
}
|
|
|
+- (void)stopLoading {
|
|
|
+ if (self.webview != nil) {
|
|
|
+ [self.webview stopLoading];
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
#pragma mark -- WkWebView Delegate
|
|
|
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction
|