- May 27, 2025
- Mins Read
Simple single-selection or multiple-selection checklist, based on UITableView.
let selectionList = SelectionList()
selectionList.items = [“One”, “Two”, “Three”, “Four”, “Five”]
selectionList.addTarget(self, action: #selector(selectionChanged), for: .valueChanged)
selectionList.selectedIndex = 3
selectionList.allowsMultipleSelection = true
selectionList.selectedIndexes = [0, 1, 4]
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
}
If you want to remove the cells seperators
selectionList.tableView.separatorStyle = .none
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' |
dependencies: [
.package(url: “https://github.com/yonat/SelectionList”, from: “1.4.2”)
]
Light and scrollable view controller for tvOS to present blocks of text Description TvOSTextViewer is a view controller to present ...
TvOSSlider is an implementation of UISlider for tvOS. Description and usage TvOSSlider palliates missing an implementation of UISlider for tvOS as part ...
TvOSScribble, based on CoreML, mitigates the lack of a physical numpad area in Siri Remote implementing a handwriting gesture recognizer. ...
PIN keyboard for tvOS Description TvOSPinKeyboard is a view controller that allows easily asking for PIN codes in tvOs Requirements ...
📺 A tvOS button which truncates long text with '... More'. The TvOSMoreButton is a simple view which aims to ...