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
EditorViewwithin the cell receives focusDeclaration
Parameters
tableViewTableView containing cell
rangeRange of content in the
EditorViewwithin the CellcellCell containing Editor
-
Invoked when
EditorViewwithin the cell loses focusDeclaration
Parameters
tableViewTableView containing cell
rangeRange of content in the
EditorViewwithin the CellcellCell containing Editor
-
Invoked when tap event occurs within the Editor contained in the cell.
Declaration
Parameters
tableViewTableView containing cell
locationTapped location
characterRangeRange of characters in the Editor at the tapped location
cellCell 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
tableViewTableView containing cell
rangeRange of selection in the
EditorViewwithin the CellattributesAttributes at selected range
contentTypeContentTypeat selected rangecellCell containing Editor
-
Invoked on change of bounds of the Editor within the cell
Declaration
Parameters
tableViewTableView containing cell
boundsBounds of the EditorView within the cell. Height of EditorView may be less than that of the Cell.
cellCell containing Editor
-
Invoked when special keys are intercepted in the Editor contained in the cell.
Declaration
Parameters
tableViewTableView containing cell
keySpecial key
rangeRange at with the key is intercepted.
cellCell containing Editor
-
Invoked when a column in
TableViewis resized.Declaration
Swift
func tableView(_ tableView: TableView, shouldChangeColumnWidth proposedWidth: CGFloat, for columnIndex: Int) -> BoolParameters
tableViewTableView containing column
proposedWidthProposed column width before the change
columnIndexIndex of column being resized
Return Value
trueif column resizing should be allowed, else false. -
Notifies when
TableViewlays 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.Parameters
tableViewTableView containing the cell.
cellCell being laid out
-
Notified that the cell that is being tried to focus using
maintainScrolledPositionLockor as a result ofscrollToneeds to be refocussed. A cell may need to be refocussed if it happens to be displayed from originally calculated position on rendering.Declaration
Parameters
tableViewTableview in which the cells are getting rendered
cellLocked
TableCellthat may need to be scrolled to.rectRectangle for content within Cell to focus.
isRenderedInforms if the cell is already rendered in viewport.
trueif it is.falseif cell is not yet in viewport /// - Note: This is only intended to be used in scenarios where Editor is being scrolled to a position withinTableViewand the cell that is being scrolled to may not have been rendered being outside viewport.
View on GitHub
TableViewDelegate Protocol Reference