Array
struct Array<Element> : RandomAccessCollection, MutableCollection
-
Returns only the nodes of the given type.
Declaration
Swift
public func only<T: Node>(ofType type: T.Type) -> [T]
Parameters
type
The target type.
Return Value
All members of the receiver that are of the given type.
-
Returns the first node of the given type.
Declaration
Swift
public func first<T: Node>(ofType type: T.Type) -> T?
Parameters
type
The target type.
Return Value
The first node of the given type.
-
Returns the objects from the receiver with the given node name.
Declaration
Swift
public func nodes(withName name: String) -> [Node]
Parameters
name
The node name to find.
Return Value
The nodes from the receiver with the given node name.