Ambiguous use of DispatchQueue on trying to use main thread Ambiguous use of DispatchQueue on trying to use main thread multithreading multithreading

Ambiguous use of DispatchQueue on trying to use main thread


Try this code instead, this is the Swift 3.0 syntax:

DispatchQueue.main.async(execute: { () -> Void in})

For Swift 4.x you can also use:

DispatchQueue.main.async {}