iOS Swift 5 UICollectionView NIB register Not Working, i using XIB file

Most likely you want to register xib for the cell and not for the view itself:

mediaProfileCollectionView.register(
   UINib(nibName: "MediaProfileCollectionViewCell", bundle: nil), 
   forCellWithReuseIdentifier: "MediaProfileCollectionViewCell"
)

Leave a Comment