TableViewDelegate

public protocol TableViewDelegate : AnyObject

An object capable of handing TableView events

  • Undocumented

    Declaration

    Swift

    var containerScrollView: UIScrollView? { get }
  • Undocumented

    Declaration

    Swift

    var viewport: CGRect? { get }
  • Invoked when EditorView within the cell receives focus

    Declaration

    Swift

    func tableView(_ tableView: TableView, didReceiveFocusAt range: NSRange, in cell: TableCell)

    Parameters

    tableView

    TableView containing cell

    range

    Range of content in the EditorView within the Cell

    cell

    Cell containing Editor

  • Invoked when EditorView within the cell loses focus

    Declaration

    Swift

    func tableView(_ tableView: TableView, didLoseFocusFrom range: NSRange, in cell: TableCell)

    Parameters

    tableView

    TableView containing cell

    range

    Range of content in the EditorView within the Cell

    cell

    Cell containing Editor

  • Invoked when tap event occurs within the Editor contained in the cell.

    Declaration

    Swift

    func tableView(_ tableView: TableView, didTapAtLocation location: CGPoint, characterRange: NSRange?, in cell: TableCell)

    Parameters

    tableView

    TableView containing cell

    location

    Tapped location

    characterRange

    Range of characters in the Editor at the tapped location

    cell

    Cell containing Editor

  • Invoked on selection changes with in the Editor contained in the cell.

    Declaration

    Swift

    func tableView(_ tableView: TableView, didChangeSelectionAt range: NSRange, attributes: [NSAttributedString.Key : Any], contentType: EditorContent.Name, in cell: TableCell)

    Parameters

    tableView

    TableView containing cell

    range

    Range of selection in the EditorView within the Cell

    attributes

    Attributes at selected range

    contentType

    ContentType at selected range

    cell

    Cell containing Editor

  • Invoked on change of bounds of the Editor within the cell

    Declaration

    Swift

    func tableView(_ tableView: TableView, didChangeBounds bounds: CGRect, in cell: TableCell)

    Parameters

    tableView

    TableView containing cell

    bounds

    Bounds of the EditorView within the cell. Height of EditorView may be less than that of the Cell.

    cell

    Cell containing Editor

  • Invoked when selection of cells is changed.

    Declaration

    Swift

    func tableView(_ tableView: TableView, didSelectCells cells: [TableCell])

    Parameters

    tableView

    TableView containing cell

    cells

    Selected cells

  • Invoked when selection of cells is changed.

    Declaration

    Swift

    func tableView(_ tableView: TableView, didUnselectCells cells: [TableCell])

    Parameters

    tableView

    TableView containing cell

    cells

    Cells that are changed from selected to unselected.

  • Invoked when special keys are intercepted in the Editor contained in the cell.

    Declaration

    Swift

    func tableView(_ tableView: TableView, didReceiveKey key: EditorKey, at range: NSRange, in cell: TableCell)

    Parameters

    tableView

    TableView containing cell

    key

    Special key

    range

    Range at with the key is intercepted.

    cell

    Cell containing Editor

  • Invoked when a column in TableView is resized.

    Declaration

    Swift

    func tableView(_ tableView: TableView, shouldChangeColumnWidth proposedWidth: CGFloat, for columnIndex: Int) -> Bool

    Parameters

    tableView

    TableView containing column

    proposedWidth

    Proposed column width before the change

    columnIndex

    Index of column being resized

    Return Value

    true if column resizing should be allowed, else false.

  • Notifies when TableView lays out a cell. This is called after the bounds calculation for the cell have been performed. Rendering of cell may not have been completed at this time.

    Declaration

    Swift

    func tableView(_ tableView: TableView, didLayoutCell cell: TableCell)

    Parameters

    tableView

    TableView containing the cell.

    cell

    Cell being laid out

  • Notified that the cell that is being tried to focus using maintainScrolledPositionLock or as a result of scrollTo needs to be refocussed. A cell may need to be refocussed if it happens to be displayed from originally calculated position on rendering.

    Declaration

    Swift

    func tableView(_ tableView: TableView, needsUpdateScrollPositionOnCell cell: TableCell, rect: CGRect, isRendered: Bool)

    Parameters

    tableView

    Tableview in which the cells are getting rendered

    cell

    Locked TableCell that may need to be scrolled to.

    rect

    Rectangle for content within Cell to focus.

    isRendered

    Informs if the cell is already rendered in viewport. true if it is. false if cell is not yet in viewport /// - Note: This is only intended to be used in scenarios where Editor is being scrolled to a position within TableView and the cell that is being scrolled to may not have been rendered being outside viewport.