I am using a collection view in a storyboard and I need one ribbon with an image in the center of the screen. Constraints work fine on iPhone, but not iPad. How can this be done?
The collectionView cell size is not specified for different screen sizes.
Use UICollectionViewDelegateFlowLayout's method
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
https://developer.apple.com/documentation/uikit/uicollectionviewdelegateflowlayout/1617708-collectionview
1.4m articles
1.4m replys
5 comments
57.0k users