How To Show Scrollbar Always On UICollectionView

前端 未结 1 1220
栀梦
栀梦 2021-02-15 06:04

I have a UICollectionView added to a UIView in an app I am working on. Displayed in the UICollectionView I have a set of images pulled from Core Data. The vertical scrolling w

1条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-15 06:34

    You can't make them always visible. Instead, you can flash them once, when the user is first presented with the collection view to notify them, that this view can be scrolled.

    Since UICollectionView is a subclass of UIScrollView you can do this:

    [myCollectionView flashScrollIndicators];
    

    Check out the Settings app for instance. When you go to a settings list that is longer then the screen, the scroll indicator is flashed once.

    0 讨论(0)
提交回复
热议问题