Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot call value of non-functional type 'DispatchQueue'

Tags:

ios10

swift3

After converting to swift 3 i found got this error kindly someone let me know whats the solution for this cannot call value of non-functional type 'DispatchQueue'enter image description here

Thank You

like image 211
niravdesai21 Avatar asked Oct 18 '25 14:10

niravdesai21


1 Answers

The error message means you call a function on a type where a property is expected.

Remove the parentheses after main

DispatchQueue.main.asynchronously(...

In the final release of Swift 3 it's simply

DispatchQueue.main.async { .... }
like image 109
vadian Avatar answered Oct 22 '25 05:10

vadian