Skip to content

Instantly share code, notes, and snippets.

@nil-biribiri
Created September 8, 2017 08:18
Show Gist options
  • Select an option

  • Save nil-biribiri/a7298fda6b37c0954b90690fedf74fdd to your computer and use it in GitHub Desktop.

Select an option

Save nil-biribiri/a7298fda6b37c0954b90690fedf74fdd to your computer and use it in GitHub Desktop.
Remove space between each UICollectionViewCell
// Conform UICollectionViewDelegateFlowLayout first
extension ViewController: UICollectionViewDelegateFlowLayout{
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return 0.0
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: self.collectionView.bounds.width, height: self.collectionView.bounds.height)
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
return 0.0
}
}
@sikandarali307
Copy link
Copy Markdown

thanks man its 100% working ,,

@sikandarali307
Copy link
Copy Markdown

can you make code for slidercollectionview as give value with some milisencd delay

@mehulparmar4ever
Copy link
Copy Markdown

100% not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment