SectionScrubber

A component to quickly scroll between collection view sections

  • 所有者: 3lvis/SectionScrubber
  • 平台:
  • 许可证: Other
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

SectionScrubber

Version
Carthage compatible
platforms
License

  • The scrubber will move along when scrolling the UICollectionView it has been added to.
  • When you pan the scrubber you 'scrub' over the UICollectionView.
  • While scrubbing you can choose the title that will be shown in the scrubber.

Usage

From your UICollectionViewController:

lazy var sectionScrubber: SectionScrubber = {
    let scrubber = SectionScrubber(collectionView: self.collectionView)
    scrubber.sectionlabelTextColor = UIColor(red: 69/255, green: 67/255, blue: 76/255, alpha: 0.8)
    scrubber.dataSource = self

    return scrubber
}()

override func viewDidLoad() {
    super.viewDidLoad()
    self.collectionView?.addSubview(sectionScrubber)
}

override func scrollViewDidScroll(scrollView: UIScrollView) {
    self.sectionScrubber.updateScrubberPosition()
}

override func scrollViewDidEndDragging(scrollView: UIScrollView, willDecelerate decelerate: Bool) {
    self.sectionScrubber.updateScrubberPosition()
}

extension RemoteCollectionController: SectionScrubberDataSource {
    func sectionScrubber(sectionScrubber: SectionScrubber, titleForSectionAt indexPath: NSIndexPath) -> String {
        return Photo.title(index: indexPath.section)
    }
}

Installation

SectionScrubber is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'SectionScrubber'

SectionScrubber is also available through Carthage. To install
it, simply add the following line to your Cartfile:

github "bakkenbaeck/SectionScrubber"

License

SectionScrubber is available under the MIT license. See the LICENSE file for more info.

Author

Bakken & Bæck, @bakkenbaeck

主要指标

概览
名称与所有者3lvis/SectionScrubber
主编程语言Swift
编程语言Ruby (语言数: 3)
平台
许可证Other
所有者活动
创建于2016-05-02 09:30:24
推送于2020-10-06 20:24:06
最后一次提交2020-10-06 22:24:01
发布数12
最新版本名称1.1.1 (发布于 )
第一版名称0.1.0 (发布于 )
用户参与
星数188
关注者数17
派生数15
提交数377
已启用问题?
问题数17
打开的问题数0
拉请求数32
打开的拉请求数0
关闭的拉请求数6
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?