-mo9mq
Last Updated: October 16, 2018
·
759
· kanshuYokoo

ios "may only be called from the main thread"

"may only be called from the main thread"
When you come up with the error, it is mainly because the function dealing with UI was called not from main thread.
It must be called from the main thread as follow

DispatchQueue.main.async(execute: {
  // call any function ex. doSomething()
   self.doSomething() 
 })

1 Response
Add your response

30854

Such great infromation you have put on your blog post. I really appreciated it.
https://fbvideo-downloader.com

16 days ago ·