GridViewDelegate
public protocol GridViewDelegate : AnyObject
An object capable of handing GridView events
-
Invoked when
EditorViewwithin the cell receives focusDeclaration
Parameters
gridViewGridView containing cell
rangeRange of content in the
EditorViewwithin the CellcellCell containing Editor
-
Invoked when
EditorViewwithin the cell loses focusDeclaration
Parameters
gridViewGridView 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
gridViewGridView 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 gridView(_ gridView: GridView, didChangeSelectionAt range: NSRange, attributes: [NSAttributedString.Key : Any], contentType: EditorContent.Name, in cell: GridCell)Parameters
gridViewGridView 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
gridViewGridView 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
gridViewGridView containing cell
keySpecial key
rangeRange at with the key is intercepted.
cellCell containing Editor
-
Invoked when a column in
GridViewis resized.Declaration
Swift
func gridView(_ gridView: GridView, shouldChangeColumnWidth proposedWidth: CGFloat, for columnIndex: Int) -> BoolParameters
gridViewGridView 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
GridViewlays 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
gridViewGridView containing the cell.
cellCell being laid out
View on GitHub
GridViewDelegate Protocol Reference