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 focusDeclaration
Parameters
tableView
TableView containing cell
range
Range of content in the
EditorView
within the Cellcell
Cell containing Editor
-
Invoked when
EditorView
within the cell loses focusDeclaration
Parameters
tableView
TableView containing cell
range
Range of content in the
EditorView
within the Cellcell
Cell containing Editor
-
Invoked when tap event occurs within the Editor contained in the cell.
Declaration
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 Cellattributes
Attributes at selected range
contentType
ContentType
at selected rangecell
Cell containing Editor
-
Invoked on change of bounds of the Editor within the cell
Declaration
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 special keys are intercepted in the Editor contained in the cell.
Declaration
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.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 ofscrollTo
needs to be refocussed. A cell may need to be refocussed if it happens to be displayed from originally calculated position on rendering.Declaration
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 withinTableView
and the cell that is being scrolled to may not have been rendered being outside viewport.