How to hide scroll bar of UICollectionView

女生的网名这么多〃 提交于 2020-07-14 20:34:01

问题


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?


回答1:


Objective C:

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

Swift 3.0

colView.showsHorizontalScrollIndicator = false
colView.showsVerticalScrollIndicator = false

From storyboard:




回答2:


in Swift:

collectionView.showsHorizontalScrollIndicator = false

in Interface Builder:



来源:https://stackoverflow.com/questions/30836571/how-to-hide-scroll-bar-of-uicollectionview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!