Kir*_*nee 24 iphone ios swift swift2 swift3
Swift 3.0:Can not convert value of type 'int' to expected argument type 'DispatchQueue.GlobalQueuePriority'
创建调度异步队列时 收到错误
DispatchQueue.global(priority: 0).async(execute: { () -> Void in
})
Run Code Online (Sandbox Code Playgroud)
Dej*_*dar 42
DispatchQueue.global
期待DispatchQueue.GlobalQueuePriority
枚举,即:
所以在你的情况下,你只需写:
DispatchQueue.global(priority: .background).async(execute: { () -> Void in
})
Run Code Online (Sandbox Code Playgroud)
如果您想要最低优先级.
快速检查显示,DispatchQueue.global(priority:_)
在iOS 8中已弃用.
DispatchQueue.global(qos: .background).async {
}
Run Code Online (Sandbox Code Playgroud)
这为您提供了更多选择:
归档时间: |
|
查看次数: |
6749 次 |
最近记录: |