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
PropertyDatainstances.Declaration
Swift
@MainActor var properties: [PropertyData<TargetType>] { get } -
An object conforming to the
ValueAssistantprotocol 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
PropertyDataobjects for the supplied MotionState objects.Remark
This method is used internally by the initializer when thestatesconvenience method is used, but you can also call it directly to build an array ofPropertyDataobjects.Declaration
Swift
@MainActor func buildPropertyData<each StateType>(forObject targetObject: Any, states: repeat MotionState<TargetType, each StateType>) -> [PropertyData<TargetType>]Parameters
forObjectThe object to be modified, and the base object for the paths of the
MotionStateobjects.statesAn Array of
MotionStateobjects that define how thePropertyDataobjects are constructed.Return Value
An Array of
PropertyDataobjects. -
setupProperty(property:Extension methodfor: ) Undocumented
Declaration
Swift
@MainActor func setupProperty(property: PropertyData<TargetType>, for targetObject: TargetType)
View on GitHub