Nathanael Carper Nathanael Carper - 1 year ago 156
Swift Question

Code not working in Xcode 8

I just upgraded to Xcode 8 and Swift 3 yesterday. I have some code that has worked in Xcode 7, but now I get a warning in Xcode 8. I converted all my code to Swift 3, but this code still gives me a warning. Here's my code:

let priority = DispatchQueue.GlobalQueuePriority.default priority).async {


Here's a picture of the code and the warning I'm getting:

My problem

Answer Source

In Swift 3 it's pretty easy {


It's the short form of .default).async {


and .default is the default priority.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download