DialogListViewController
class DialogListViewController<T> : DialogViewController where T : StaticTableItem
Generic dialog with a list of items with (multi-)selection option.
-
Creates a
DialogListViewControllerwith a list of items of typeTand other parameters.Note
Item element should conform to
StaticTableItem.Declaration
Swift
init(list: [T], title: String, selectionType: StaticTableViewSelectionType = .single, color: UIColor = .systemBlue, completion: @escaping (SelectedRows) -> Bool)Parameters
listUnderlying list of elements of base type
StaticTableItemfor this instance.titleTitle of the dialog.
selectionTypeStaticTableViewSelectionTypeto be used to setup the selection type.colorAccent color of the dialog.
completionCompletion handler with the selected index of elements. If it’s empty then the dialog was cancelled.
View on GitHub
Install in Dash
DialogListViewController Class Reference