iosswiftuicollectionviewcarouseluipagecontrol

Remove horizontal line when swiping across a collection view / carousel view with page control (Swift)


I am using a standard UICollectionView, UIPageControl and using this custom carousel flow layout.

https://github.com/ink-spot/UPCarouselFlowLayout

I am unsure which property is actually triggering this, whether it is related to the collection view itself or the carousel..

enter image description here

How can I remove this grey horizontal line that appears when I swipe left or right? It remains on screen for a few seconds.. But I wan't to get rid of it all together.

Thanks

Edit:

Fixed by adding this after initialisation of the collection view..

collectionView.showsHorizontalScrollIndicator = false

Solution

  • Set collectionview.showsHorizontalScrollIndicator to false after initialising it in the view controller class..

    Like this:

    collectionView.showsHorizontalScrollIndicator = false