I have a UICollectionView
with a segmented control
to switch between data. But how do I change the UICollectionViewCell
size propertie
first Conform protocol the UICollectionViewDelegateFlowLayout
set width and height UICollectionViewCell
UIcollectionViewCell Hight = 300;
UIcollectionViewCell Width = 380;
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout,sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: CGFloat((380)), height: CGFloat(300))
}