In my opinion, I have several views ( UICollectionViewCell s) which, depending on the model, may include UIImageView as a subheading (each with a separate instance).
In my case, views that don't show UIImageView outperform numbers that show this.
I can choose to either call UIImageView.hidden = false when I want the views to display the image, or to set the image inside the image, i.e. UIImageView.image = UIImage(named: ...) .
I wonder which one is more efficient, with memory and speed issues? I have a feeling that the difference is not significant enough, especially when caching UIImage(named:) , but I want to find out.
source share