声明
func swiftBlock(endStr: String, _ callBack: (_ result: String) -> ()) {
let str: String = "test" + endStr
callBack(str)
}
调用:
swiftBlock(end: "lalalla") { (_ str) in
print("str === \(str)")
}
声明
func swiftBlock(endStr: String, _ callBack: (_ result: String) -> ()) {
let str: String = "test" + endStr
callBack(str)
}
调用:
swiftBlock(end: "lalalla") { (_ str) in
print("str === \(str)")
}