diff --git a/README.md b/README.md index 8d89de2..db4bd28 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,12 @@ Note That the default dialog box implemented by DSBridge is modal. This will bl +# WKUIDelegate + +In `DWKWebView ` , please use ` DSUIDelegate` instead of `UIDelegate` , because `UIDelegate` has already been set inner `DWKWebView ` , `DSUIDelegate` is a proxy of `UIDelegate` . + + + ## API Reference ### Object-C API diff --git a/dsBridge.podspec b/dsBridge.podspec index b903edf..2684972 100644 --- a/dsBridge.podspec +++ b/dsBridge.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "dsBridge" - s.version = "3.0.1" + s.version = "3.0.2" s.summary = "An ios bridge for calling functions synchronously and asynchronously between JavaScript and Object-C in WKWebView/UIWebView" # This description is used to generate tags and improve search results. diff --git a/dsbridgedemo/ViewController.m b/dsbridgedemo/ViewController.m index d2155f2..e6d9f3f 100644 --- a/dsbridgedemo/ViewController.m +++ b/dsbridgedemo/ViewController.m @@ -46,6 +46,7 @@ - (void)viewDidLoad { [dwebview callHandler:@"addValue" arguments:@[@3,@4] completionHandler:^(NSNumber * value){ NSLog(@"%@",value); }]; + [dwebview callHandler:@"append" arguments:@[@"I",@"love",@"you"] completionHandler:^(NSString * _Nullable value) { NSLog(@"call succeed, append string is: %@",value); diff --git a/readme-chs.md b/readme-chs.md index 2a43105..fc4b08a 100644 --- a/readme-chs.md +++ b/readme-chs.md @@ -186,6 +186,12 @@ DSBridge已经实现了 Javascript的弹出框函数(alert/confirm/prompt),这 +# WKUIDelegate + +在 `DWKWebView ` 中,请使用` DSUIDelegate` 代替 `UIDelegate` , 因为在`DWKWebView ` 内部 `UIDelegate`已经设置过了,而 `DSUIDelegate` 正是 `UIDelegate` 的一个代理。 + + + ## API 列表 ### Object-C API