Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yonat/SelectionList
Simple single-selection or multiple-selection checklist, based on UITableView
https://github.com/yonat/SelectionList
checkbox checklist radio-buttons radiobutton selectionmenu swift uitableview
Last synced: 3 days ago
JSON representation
Simple single-selection or multiple-selection checklist, based on UITableView
- Host: GitHub
- URL: https://github.com/yonat/SelectionList
- Owner: yonat
- License: mit
- Created: 2018-03-27T10:32:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-01T14:19:09.000Z (about 1 month ago)
- Last Synced: 2024-11-29T21:28:34.779Z (12 days ago)
- Topics: checkbox, checklist, radio-buttons, radiobutton, selectionmenu, swift, uitableview
- Language: Swift
- Homepage:
- Size: 92.8 KB
- Stars: 123
- Watchers: 5
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-ios - SelectionList - Simple single-selection or multiple-selection checklist, based on UITableView. (UI / Table View / Collection View)
- awesome-swift - SelectionList - Simple single-selection or multiple-selection checklist, based on UITableView. (Libs / UI)
- awesome-swift - SelectionList - Simple single-selection or multiple-selection checklist, based on UITableView. (Libs / UI)
- awesome-ios-star - SelectionList - Simple single-selection or multiple-selection checklist, based on UITableView. (UI / Table View / Collection View)
- fucking-awesome-swift - SelectionList - Simple single-selection or multiple-selection checklist, based on UITableView. (Libs / UI)
- awesome-swift - SelectionList - Simple single-selection or multiple-selection checklist, based on UITableView ` 📝 2 months ago` (UI [🔝](#readme))
README
# SelectionList
Simple single-selection or multiple-selection checklist, based on UITableView.[![Swift Version][swift-image]][swift-url]
[![Build Status][travis-image]][travis-url]
[![License][license-image]][license-url]
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/SelectionList.svg)](https://img.shields.io/cocoapods/v/SelectionList.svg)
[![Platform](https://img.shields.io/cocoapods/p/SelectionList.svg?style=flat)](http://cocoapods.org/pods/SelectionList)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
## Usage
```swift
let selectionList = SelectionList()
selectionList.items = ["One", "Two", "Three", "Four", "Five"]
selectionList.addTarget(self, action: #selector(selectionChanged), for: .valueChanged)
selectionList.selectedIndex = 3
```## Multiple Selection
```swift
selectionList.allowsMultipleSelection = true
selectionList.selectedIndexes = [0, 1, 4]
```## Changing Appearance
The following properties can be changed either in Interface Builder or in code:
```swift
selectionList.selectionImage = UIImage(named: "v")
selectionList.deselectionImage = UIImage(named: "o")
selectionList.isSelectionMarkTrailing = false // to put checkmark on left side
selectionList.rowHeight = 42.0
```You can do additional styling in code:
```swift
selectionList.setupCell = { (cell: UITableViewCell, index: Int) in
cell.textLabel?.textColor = .gray
}
```If you want to remove the cells seperators
```swift
selectionList.tableView.separatorStyle = .none
```## Requirements
- iOS 9.0+
- Xcode 9+## Installation
### CocoaPods:
```ruby
pod 'SelectionList'
```Legacy versions:
| Swift version | SelectionList version |
| :---: | :---: |
| 4.1 (Xcode 9.4) | `pod 'SelectionList', '~> 1.2.0'` |
| 4.0 | `pod 'SelectionList', '~> 1.0.2'` |### Swift Package Manager:
```swift
dependencies: [
.package(url: "https://github.com/yonat/SelectionList", from: "1.4.5")
]
```## Meta
[@yonatsharon](https://twitter.com/yonatsharon)
[https://github.com/yonat/SelectionList](https://github.com/yonat/SelectionList)
[swift-image]:https://img.shields.io/badge/swift-4.2-orange.svg
[swift-url]: https://swift.org/
[license-image]: https://img.shields.io/badge/License-MIT-blue.svg
[license-url]: LICENSE.txt
[travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/dbader/node-datadog-metrics
[codebeat-image]: https://codebeat.co/badges/c19b47ea-2f9d-45df-8458-b2d952fe9dad
[codebeat-url]: https://codebeat.co/projects/github-com-vsouza-awesomeios-com