Hello I am making horizontal collection view image on screen then scroll to view second the problem is when i give spacing to my collectionView then scrol to another images it show half image of another record mean half image one side and image of first record guide me how i give proper spacing i want to show single image on screen the scrol to view second with spacing this is screen shot of spacing
this is what I am facing when i scroll 1 or 2 images then it show me half image of another record
I am already using CollectionViewLayout to give equal width and height to my cell
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let width = collectionView.frame.size.width
let height = collectionView.frame.size.height
return CGSize.init(width: width, height: height)
}