TableViewBlockDelegate
open class TableViewBlockDelegate<CellType: UITableViewCell, Type: Equatable>: NSObject, UITableViewDelegate
where CellType: Configurable
Basic UITableViewDelegate abstracting value selection, having elements of type Type and using ConfigurableTableViewCell
-
Inits the Delegate.
Declaration
Swift
public init(with dataSource: TableViewArrayDataSource<CellType, Type>, onSelected: @escaping ((Type) -> Void))Parameters
dataSourceDataSource backing the TableView, where data will be extracted from.
onSelectedLogic to handle value selection.
-
TableView selection method.
Declaration
Swift
public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)Parameters
tableViewWhere the value was selected.
indexPathThe selected row to be related to the selected value.
View on GitHub
TableViewBlockDelegate Class Reference