Latest 1.1.1
Homepage https://github.com/bakkenbaeck/SectionScrubber
License MIT
Platforms ios 9.0, tvos 9.0, requires ARC
Authors

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 with title will be shown in the scrubber.

SectionScrubber

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

Latest podspec

{
    "name": "SectionScrubber",
    "summary": "A component to quickly scroll between collection view sections",
    "version": "1.1.1",
    "homepage": "https://github.com/bakkenbaeck/SectionScrubber",
    "license": "MIT",
    "authors": {
        "Bakken & Bu00e6ck": "[email protected]"
    },
    "source": {
        "git": "https://github.com/bakkenbaeck/SectionScrubber.git",
        "tag": "1.1.1"
    },
    "social_media_url": "https://twitter.com/bakkenbaeck",
    "platforms": {
        "ios": "9.0",
        "tvos": "9.0"
    },
    "requires_arc": true,
    "source_files": "Sources/**/*",
    "resources": "Resources/**/*",
    "resource_bundles": {
        "SectionScrubberResources": [
            "Resources/**/*"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This