- July 30, 2025
- Mins Read
UICollectionView
it has been added to.UICollectionView
.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)
}
}
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”
PermissionsSwiftUI displays and handles permissions in SwiftUI. It is largely inspired by SPPermissions. The UI is highly customizable and resembles an Apple style. ...
Introduction PagerTabStripView is the first pager view built in pure SwiftUI. It provides a component to create interactive pager views ...
1. Taking Action When a Property Changes: Property Observers Swift lets you observe and respond to changes in a property’s ...