https://github.com/afrazcodes/swift-horizontalpickerview
UIKit horizontal picker view component
https://github.com/afrazcodes/swift-horizontalpickerview
Last synced: 9 months ago
JSON representation
UIKit horizontal picker view component
- Host: GitHub
- URL: https://github.com/afrazcodes/swift-horizontalpickerview
- Owner: AfrazCodes
- Created: 2022-02-05T17:49:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-07T07:28:06.000Z (over 4 years ago)
- Last Synced: 2025-07-14T21:37:55.376Z (11 months ago)
- Language: Swift
- Size: 56.6 KB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Horizontal Picker View
Customizable horizontal picker view component written in Swift for UIKit/iOS.
- Flexible dataSource and delegates
- Minimal and functional
- Performant and testable
- Extensible and configurable
Usage
```swift
// Creation
let picker = HorizontalPickerView()
picker.datasource = self
picker.delegate = self
// Provide data
/// Number of rows to render
/// - Returns: Row count
func numberOfRows() -> Int
/// Number of items to render in each row
/// - Returns: Item count
func numberOfItems(in picker: HorizontalPickerView, for row: Int) -> Int
/// Attributed title to render in a given item at `IndexPath`
/// - Returns: Attributed String
func horizontalPickerView(
_ picker: HorizontalPickerView,
attributedTitleAt indexPath: IndexPath
) -> NSAttributedString?
```