简体   繁体   English

带有粘性水平指示器Swift3.0的UICollectionView

[英]UICollectionView with Sticky horizontal indicator Swift 3.0

当我来回滚动时,我想为UICollectionView设置粘性水平滚动指示器。

UICollectionView inherits from UIScrollView . UICollectionView继承自UIScrollView There's no easy way to always show the scroll indicator. 没有简单的方法可以始终显示滚动指示器。 The indicator is visible while tracking is underway and fades out after tracking. 跟踪正在进行时,该指示器可见,跟踪后逐渐消失。

You can flash the indicators using collectionView.flashScrollIndicators() to show the user that they exist. 您可以使用collectionView.flashScrollIndicators()刷新指标以向用户显示它们的存在。

Otherwise, you can for example create a custom UICollectionView or extend UIScrollView to create your own indicators that's always visible. 否则,您可以例如创建自定义UICollectionView或扩展UIScrollView以创建自己的始终可见的指示器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM