0

I have a UICollectionView with two section. In first, it has UIPageControl and in second simple UICollectionView. Between first and second element it has spacing, can you suggest me how to remove that?

enter image description here

Platform iOS 9.*, Swift 3

ankit
  • 3,537
  • 1
  • 16
  • 32
Janserik
  • 2,306
  • 1
  • 24
  • 43
  • 2
    Possible duplicate of [Remove space between sections in collectionview](http://stackoverflow.com/questions/28386506/remove-space-between-sections-in-collectionview) – KKRocks Apr 20 '17 at 05:03

1 Answers1

6

You can specify the UIEdgeInsets of the collection view to solve this problem

 func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
        return UIEdgeInsetsMake(0, 0, 0, 0)
    }
harshal jadhav
  • 5,456
  • 2
  • 18
  • 26