dispatch_benchmark()是GCD中没有导出的函数。但是,您可以在Objective C中通过在代码中声明它来调用它:
uint64_t dispatch_benchmark(size_t count, void (^block)(void));我怎么能做到这是Swift
发布于 2016-04-29 20:37:59
只需将声明放入桥接标头:
@import Foundation;
uint64_t dispatch_benchmark(size_t count, void (^block)(void));这将使该函数在Swift中自动可用。
https://stackoverflow.com/questions/36946864
复制相似问题