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

Property is accessed but result is unused

I saw there another similar one to my question but that was very old! , So I have an UIActivityIndicatorView but when i try to call the .hidesWhenStopped it just warns Property is accessed but result is unused for no reason?

What could be the problem?
I tried under viewDidLoad too but same 🙁

This is a part of my code:

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

Timer.scheduledTimer(withTimeInterval: 3, repeats: false) { [self] _ in
   monitorimiTableView.reloadData()
   configureTableView()
   loaderMonitorimi.hidesWhenStopped // Property is accessed but result is unused
}

>Solution :

You need to assign a value to the property:

loaderMonitorimi.hidesWhenStopped = true

(or false if you don’t want to hide it)

If you just write loaderMonitorimi.hidesWhenStopped without any assignment, this expression will result in the boolean value stored in the hidesWhenStopped property, but the result of the expression is not used, hence the warning.

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