无法获得线索 - 如何在 Swift 中将“dispatch_get_main_queue()”分配给常量?
例如在 Objective-C 中它看起来如下:
#define kMainQueue dispatch_get_main_queue()
在这种情况下我应该使用 typealias 还是其他? 谢谢
最佳答案
你是这个意思吗?
let kMainQueue = dispatch_get_main_queue()
kMainQueue
是常量,这要归功于 let
关于ios - 如何将 "dispatch_get_main_queue()"分配给 Swift 中的常量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34539898/