PropertyCollection
@MainActor
public protocol PropertyCollection<TargetType> : AnyObject
This protocol represents an object that holds a collection of PropertyData
objects, such as a Motion
class.
-
Undocumented
Declaration
Swift
associatedtype TargetType : AnyObject
-
A collection of
PropertyData
instances.Declaration
Swift
@MainActor var properties: [PropertyData<TargetType>] { get }
-
An object conforming to the
ValueAssistant
protocol which acts as an interface for retrieving and updating value types.Declaration
Swift
@MainActor var valueAssistant: any ValueAssistant<TargetType> { get set }
-
addAssistants()
Default implementationUndocumented
Default Implementation
Undocumented
Declaration
Swift
@MainActor func addAssistants()
-
buildPropertyData(forObject:
Extension methodstates: ) Builds
PropertyData
objects for the supplied MotionState objects.Remark
This method is used internally by the initializer when thestates
convenience method is used, but you can also call it directly to build an array ofPropertyData
objects.Declaration
Swift
@MainActor func buildPropertyData<each StateType>(forObject targetObject: Any, states: repeat MotionState<TargetType, each StateType>) -> [PropertyData<TargetType>]
Parameters
forObject
The object to be modified, and the base object for the paths of the
MotionState
objects.states
An Array of
MotionState
objects that define how thePropertyData
objects are constructed.Return Value
An Array of
PropertyData
objects. -
setupProperty(property:
Extension methodfor: ) Undocumented
Declaration
Swift
@MainActor func setupProperty(property: PropertyData<TargetType>, for targetObject: TargetType)