49

I m working on a UICollectionView class, and it will display the scroll bar when I scroll on the list, it's possible to hide scroll bar when scrolling?

Tejas Ardeshna
  • 4,343
  • 2
  • 20
  • 39
TIANLAOBA
  • 511
  • 1
  • 4
  • 5

3 Answers3

121

Objective C:

 [collectionView setShowsHorizontalScrollIndicator:NO];
 [collectionView setShowsVerticalScrollIndicator:NO];

Swift 3.0

colView.showsHorizontalScrollIndicator = false
colView.showsVerticalScrollIndicator = false

From storyboard:

enter image description here

Tejas Ardeshna
  • 4,343
  • 2
  • 20
  • 39
14

in Swift:

collectionView.showsHorizontalScrollIndicator = false

in Interface Builder: enter image description here

rgreso
  • 496
  • 1
  • 7
  • 19
3

Option #1 (by code):

myCollectionView.showsVerticalScrollIndicator = false
myCollectionView.showsHorizontalScrollIndicator = false

Option #2 (from storyboard):

Go to Attributes inspector > Uncheck "Show Horizontal Indicator" and "Show Vertical Indicator"

iosMentalist
  • 3,066
  • 1
  • 30
  • 40
Osama Remlawi
  • 2,356
  • 20
  • 21