我有这个用swift编写的静态函数,我需要在objective-c文件中调用
static func downloadVideo(url: String, onResult: @escaping(String?) -> ()){
//some code
onResult("done")
}
迅速我会简单地称之为
Service.downloadVideo(url: "url") { (string) in
print(string)
}
我应该如何在objective-c文件中调用它?
编辑:我想它应该看起来像这样?
[[Service new] downloadVideo:@"url" onResult:^{
NSLog(@"success")
}];