Closed TaeJoongYoon closed 5 years ago
You have to use UICollectionView
's designated initializer.
let collectionView = UICollectionView(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout()).then {
$0.translatesAutoresizingMaskIntoConstraints = false
$0.register(Reusable.flickrCell)
}
Thank you!
I did it like your code... but it was not working...
It's nice now, I don't know why 😂😂 perhaps it's my fault.
If I create a UICollectionView with upside code, it works good. However, I create UICollectionView with downside code, it doesn`t show cells. Others code all same.
What's the problem??