Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Do we need to perform the alpha change operation inside Main Queue in Swift?

The saying "All the UI operations should be performed inside the main queue" becomes a little confusing when it comes to alpha. I have doubt do we really need to perform a simple alpha change operation inside the main Queue?

self.presentingViewController?.view.alpha = 0.6 // such operations 

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

do we really need to perform a simple alpha change operation inside the main Queue?

Yes we do. Basically you don’t want to do anything to a view off the main thread. And do not try to cheat by shifting the burden to the view’s layer.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading