I'm not using storyboard, everything is done by code.. and when I scroll the UICollectionView.. after it reusing correctly..some cells.. than it happen :
-the cell initWithFrame is being call
-new gray hair appear on my head.
I read other q/a and check maybe it's something with threads but all the reloadData is on the main thread.
any directions ?
I have no idea what's your code, so I'll propose how do I do it:
And later the delegate:
There is another possibility. Your cell, as it's reusable, will have already saved previous properties. So if you did something like this:
Then do notice, that new cell will still have this image set! You need to add:
To reset it from previous state. You can also override
prepareForReuse:
method ofUICollectionViewCell
class to reset the values (don't forget to call super).