Skip to content

Latest commit

 

History

History
363 lines (241 loc) · 9.16 KB

TableView.md

File metadata and controls

363 lines (241 loc) · 9.16 KB

TableView

@available(iOS 11.0, *) public class TableView: UITableView

Inheritance

UITableView, UITableViewDataSource, UITableViewDelegate

Initializers

init(initalData:style:)

public init(initalData: [[CellDisplayable]] = [[CellDisplayable]](), style: UITableView.Style = .plain)

Properties

data

var data: [[CellDisplayable]]

Methods

update(shouldReloadData:_:)

@discardableResult func update(shouldReloadData: Bool = false, _ closure: ([[CellDisplayable]]) -> [[CellDisplayable]]) -> Self

append(shouldReloadData:_:)

@discardableResult func append(shouldReloadData: Bool = false, _ closure: () -> [[CellDisplayable]]) -> Self

numberOfSections(in:)

public func numberOfSections(in tableView: UITableView) -> Int

tableView(_:numberOfRowsInSection:)

public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int

tableView(_:indentationLevelForRowAt:)

public func tableView(_ tableView: UITableView, indentationLevelForRowAt indexPath: IndexPath) -> Int

tableView(_:cellForRowAt:)

public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell

tableView(_:heightForHeaderInSection:)

public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat

tableView(_:heightForFooterInSection:)

public func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat

tableView(_:viewForHeaderInSection:)

public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView?

tableView(_:viewForFooterInSection:)

public func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView?

tableView(_:canEditRowAt:)

public func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool

tableView(_:canMoveRowAt:)

public func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool

tableView(_:canFocusRowAt:)

public func tableView(_ tableView: UITableView, canFocusRowAt indexPath: IndexPath) -> Bool

tableView(_:shouldHighlightRowAt:)

public func tableView(_ tableView: UITableView, shouldHighlightRowAt indexPath: IndexPath) -> Bool

tableView(_:shouldIndentWhileEditingRowAt:)

public func tableView(_ tableView: UITableView, shouldIndentWhileEditingRowAt indexPath: IndexPath) -> Bool

tableView(_:shouldShowMenuForRowAt:)

public func tableView(_ tableView: UITableView, shouldShowMenuForRowAt indexPath: IndexPath) -> Bool

tableView(_:editingStyleForRowAt:)

public func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCell.EditingStyle

tableView(_:titleForDeleteConfirmationButtonForRowAt:)

public func tableView(_ tableView: UITableView, titleForDeleteConfirmationButtonForRowAt indexPath: IndexPath) -> String?

tableView(_:editActionsForRowAt:)

public func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]?

tableView(_:commit:forRowAt:)

public func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath)

tableView(_:didSelectRowAt:)

public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)

tableView(_:didDeselectRowAt:)

public func tableView(_ tableView: UITableView, didDeselectRowAt indexPath: IndexPath)

tableView(_:willBeginEditingRowAt:)

public func tableView(_ tableView: UITableView, willBeginEditingRowAt indexPath: IndexPath)

tableView(_:didEndEditingRowAt:)

public func tableView(_ tableView: UITableView, didEndEditingRowAt indexPath: IndexPath?)

tableView(_:didHighlightRowAt:)

public func tableView(_ tableView: UITableView, didHighlightRowAt indexPath: IndexPath)

tableView(_:didUnhighlightRowAt:)

public func tableView(_ tableView: UITableView, didUnhighlightRowAt indexPath: IndexPath)

tableView(_:moveRowAt:to:)

public func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath)

tableView(_:leadingSwipeActionsConfigurationForRowAt:)

@available(iOS 11.0, *) public func tableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration?

tableView(_:trailingSwipeActionsConfigurationForRowAt:)

@available(iOS 11.0, *) public func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration?

set(dataSource:)

@discardableResult func set(dataSource: UITableViewDataSource) -> Self

set(delegate:)

@discardableResult func set(delegate: UITableViewDelegate) -> Self

register(cells:)

@discardableResult func register(cells: [TableViewCell.Type]) -> Self

headerView(_:)

@discardableResult func headerView(_ handler: @escaping TableHeaderFooterViewHandler) -> Self

footerView(_:)

@discardableResult func footerView(_ handler: @escaping TableHeaderFooterViewHandler) -> Self

headerHeight(_:)

@discardableResult func headerHeight(_ handler: @escaping (Int) -> CGFloat) -> Self

footerHeight(_:)

@discardableResult func footerHeight(_ handler: @escaping (Int) -> CGFloat) -> Self

indentationLevelForRowAtIndexPath(_:)

@discardableResult func indentationLevelForRowAtIndexPath(_ handler: @escaping (IndexPath) -> Int) -> Self

canEditRowAtIndexPath(_:)

@discardableResult func canEditRowAtIndexPath(_ handler: @escaping (IndexPath) -> Bool) -> Self

canMoveRowAtIndexPath(_:)

@discardableResult func canMoveRowAtIndexPath(_ handler: @escaping (IndexPath) -> Bool) -> Self

canFocusRowAtIndexPath(_:)

@discardableResult func canFocusRowAtIndexPath(_ handler: @escaping (IndexPath) -> Bool) -> Self

shouldHighlightRow(_:)

@discardableResult func shouldHighlightRow(_ handler: @escaping TableHighlightIndexPathHandler) -> Self

shouldIndentWhileEditingRowAtIndexPath(_:)

@discardableResult func shouldIndentWhileEditingRowAtIndexPath(_ handler: @escaping (IndexPath) -> Bool) -> Self

shouldShowMenuForRowAtIndexPath(_:)

@discardableResult func shouldShowMenuForRowAtIndexPath(_ handler: @escaping (IndexPath) -> Bool) -> Self

editingStyleForRowAtIndexPath(_:)

@discardableResult func editingStyleForRowAtIndexPath(_ handler: @escaping (IndexPath) -> UITableViewCell.EditingStyle) -> Self

titleForDeleteConfirmationButtonForRowAtIndexPath(_:)

@discardableResult func titleForDeleteConfirmationButtonForRowAtIndexPath(_ handler: @escaping (IndexPath) -> String) -> Self

editActionsForRowAtIndexPath(_:)

@discardableResult func editActionsForRowAtIndexPath(_ handler: @escaping (IndexPath) -> [UITableViewRowAction]) -> Self

commitEditingStyleForRowAtIndexPath(_:)

@discardableResult func commitEditingStyleForRowAtIndexPath(_ handler: @escaping (UITableViewCell.EditingStyle, IndexPath) -> Void) -> Self

didSelectRow(_:)

@discardableResult func didSelectRow(_ handler: @escaping TableDidSelectIndexPathHandler) -> Self

didDeselectRowAtIndexPath(_:)

@discardableResult func didDeselectRowAtIndexPath(_ handler: @escaping (IndexPath) -> Void) -> Self

willBeginEditingRowAtIndexPath(_:)

@discardableResult func willBeginEditingRowAtIndexPath(_ handler: @escaping (IndexPath) -> Void) -> Self

didEndEditingRowAtIndexPath(_:)

@discardableResult func didEndEditingRowAtIndexPath(_ handler: @escaping (IndexPath?) -> Void) -> Self

didHighlightRowAtIndexPath(_:)

@discardableResult func didHighlightRowAtIndexPath(_ handler: @escaping (IndexPath) -> Void) -> Self

didUnhighlightRowAtIndexPath(_:)

@discardableResult func didUnhighlightRowAtIndexPath(_ handler: @escaping (IndexPath) -> Void) -> Self

moveRowAtSourceIndexPathToDestinationIndexPath(_:)

@discardableResult func moveRowAtSourceIndexPathToDestinationIndexPath(_ handler: @escaping (IndexPath, IndexPath) -> Void) -> Self

leadingSwipeActionsConfigurationForRowAtIndexPath(_:)

@discardableResult func leadingSwipeActionsConfigurationForRowAtIndexPath(_ handler: @escaping (IndexPath) -> UISwipeActionsConfiguration) -> Self

trailingSwipeActionsConfigurationForRowAtIndexPath(_:)

@discardableResult func trailingSwipeActionsConfigurationForRowAtIndexPath(_ handler: @escaping (IndexPath) -> UISwipeActionsConfiguration) -> Self