Adds a new row of a given type at a given location.
SDK
- macOS 10.5+
Framework
- App
Kit
Declaration
func insertRow(at rowIndex: Int, with rowType: NSRule Editor.Row Type, asSubrowOfRow parentRow: Int, animate shouldAnimate: Bool)
Parameters
rowIndex
The index at which the new row should be inserted.
row
must be greater thanIndex parent
, and much specify a row that does not fall amongst the children of some other parent.Row rowType
The type of the new row.
parentRow
The index of the row of which the new row is a child. Pass
-1
to indicate that the new row should be a root row.shouldAnimate
true
if creation of the new row should be animated, otherwisefalse
.
Discussion
Important
If parent
is greater than or equal to row
, or if row
would fall amongst the children of some other parent, or if the nesting mode forbids this configuration, an NSInvalid
is raised.