From cf556eea0b8ef7696a8884eb38848d269be0636a Mon Sep 17 00:00:00 2001 From: duwen Date: Fri, 7 Sep 2018 10:34:05 +0800 Subject: [PATCH] add swift support --- README.md | 2 +- readme-chs.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 417c621..467b434 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ In order to be compatible with IOS , we make the following convention on Object In Swift, you should declare APIs as follows: -``` +```swift //MUST USE "_" to ignore the first argument name explicitly。 @objc func testSyn( _ arg:String) -> String { return String(format:"%@[Swift sync call:%@]", arg, "test") diff --git a/readme-chs.md b/readme-chs.md index eedd674..0ad2655 100644 --- a/readme-chs.md +++ b/readme-chs.md @@ -129,7 +129,7 @@ pod "dsBridge" 在 Swift中,你应该按照如下方式声明APIs: -``` +```swift //必须给第一个参数前添加下划线"_"来显式忽略参数名。 @objc func testSyn( _ arg:String) -> String { return String(format:"%@[Swift sync call:%@]", arg, "test")