GridViewDelegate
public protocol GridViewDelegate : AnyObject
An object capable of handing GridView
events
-
Invoked when
EditorView
within the cell receives focusDeclaration
Parameters
gridView
GridView containing cell
range
Range of content in the
EditorView
within the Cellcell
Cell containing Editor
-
Invoked when
EditorView
within the cell loses focusDeclaration
Parameters
gridView
GridView 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
gridView
GridView 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 gridView(_ gridView: GridView, didChangeSelectionAt range: NSRange, attributes: [NSAttributedString.Key : Any], contentType: EditorContent.Name, in cell: GridCell)
Parameters
gridView
GridView 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
gridView
GridView 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
gridView
GridView containing cell
key
Special key
range
Range at with the key is intercepted.
cell
Cell containing Editor
-
Invoked when a column in
GridView
is resized.Declaration
Swift
func gridView(_ gridView: GridView, shouldChangeColumnWidth proposedWidth: CGFloat, for columnIndex: Int) -> Bool
Parameters
gridView
GridView 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
GridView
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
gridView
GridView containing the cell.
cell
Cell being laid out