Latest 1.3.0
Homepage https://github.com/yonat/SelectionList
License MIT
Platforms ios 9.0, requires ARC
Authors

Simple single-selection or multiple-selection checklist, based on UITableView.

Swift Version
Build Status
License
CocoaPods Compatible
Platform
PRs Welcome

SelectionList    SelectionList

Usage

let selectionList = SelectionList()
selectionList.items = ["One", "Two", "Three", "Four", "Five"]
selectionList.addTarget(self, action: #selector(selectionChanged), for: .valueChanged)
selectionList.selectedIndex = 3

Multiple Selection

selectionList.allowsMultipleSelection = true
selectionList.selectedIndexes = [0, 1, 4]

Changing Appearance

The following properties can be changed either in Interface Builder or in code:

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:

selectionList.setupCell =  { (cell: UITableViewCell, index: Int) in
    cell.textLabel?.textColor = .gray
}

Requirements

  • iOS 9.0+
  • Xcode 9+

Installation

CocoaPods:

pod 'SelectionList'

Legacy versions:

Swift version SelectionList version
4.1 1.2.0
4.0 1.0.2

Manually:

Copy Sources/SelectionList.swift to your Xcode project.

Meta

@yonatsharon

https://github.com/yonat/SelectionList

Latest podspec

{
    "name": "SelectionList",
    "version": "1.3.0",
    "summary": "Simple single-selection or multiple-selection checklist, based on UITableView.",
    "homepage": "https://github.com/yonat/SelectionList",
    "screenshots": "https://raw.githubusercontent.com/yonat/SelectionList/master/Screenshots/SelectionList.png",
    "license": {
        "type": "MIT",
        "file": "LICENSE.txt"
    },
    "authors": {
        "Yonat Sharon": "[email protected]"
    },
    "social_media_url": "http://twitter.com/yonatsharon",
    "swift_version": "4.2",
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/yonat/SelectionList.git",
        "tag": "1.3.0"
    },
    "source_files": "Sources/*.swift"
}

Pin It on Pinterest

Share This