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