Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/3lvis/SectionScrubber
A component to quickly scroll between collection view sections
https://github.com/3lvis/SectionScrubber
Last synced: 3 months ago
JSON representation
A component to quickly scroll between collection view sections
- Host: GitHub
- URL: https://github.com/3lvis/SectionScrubber
- Owner: 3lvis
- License: other
- Archived: true
- Created: 2016-05-02T09:30:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-10-06T20:24:06.000Z (about 4 years ago)
- Last Synced: 2024-07-30T10:09:33.178Z (3 months ago)
- Language: Swift
- Homepage:
- Size: 12 MB
- Stars: 188
- Watchers: 18
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ios - SectionScrubber - A component to quickly scroll between collection view sections (UI / Table View / Collection View)
- awesome-swift - SectionScrubber - A component to quickly scroll between collection view sections. (Libs / UI)
- awesome-ios-star - SectionScrubber - A component to quickly scroll between collection view sections (UI / Table View / Collection View)
- awesome-swift - SectionScrubber - A component to quickly scroll between collection view sections ` 📝 9 months ago` (UI [🔝](#readme))
README
# SectionScrubber
[![Version](https://img.shields.io/cocoapods/v/SectionScrubber.svg?style=flat)](https://cocoapods.org/pods/SectionScrubber)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/bakkenbaeck/SectionScrubber)
![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20tvOS%20-lightgrey.svg)
[![License](https://img.shields.io/cocoapods/l/SectionScrubber.svg?style=flat)](https://cocoapods.org/pods/DATAStack)* 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:
```swift
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 = selfreturn 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](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'SectionScrubber'
```**SectionScrubber** is also available through [Carthage](https://github.com/Carthage/Carthage). To install
it, simply add the following line to your Cartfile:```ruby
github "bakkenbaeck/SectionScrubber"
```## License
**SectionScrubber** is available under the MIT license. See the LICENSE file for more info.
## Author
Bakken & Bæck, [@bakkenbaeck](https://twitter.com/bakkenbaeck)