ValueAssistantGroup
@MainActor
public final class ValueAssistantGroup<TargetType> : ValueAssistant where TargetType : AnyObject
The ValueAssistantGroup
class enables multiple ValueAssistant
objects to be attached to a single motion class.
-
Declaration
Swift
@MainActor public var isAdditive: Bool { get set }
-
Declaration
Swift
@MainActor public var additiveWeighting: Double { get set }
-
Updates the
additive
state of all childValueAssistant
objects in this group.Declaration
Swift
@MainActor public func updateAdditive(isAdditive: Bool)
Parameters
isAdditive
The new
additive
state to assign. -
An array of
ValueAssistant
objects that this group manages.Declaration
Swift
@MainActor private(set) public var assistants: [any ValueAssistant<TargetType>] { get }
-
Initializer.
Declaration
Swift
@MainActor public init(assistants: [any ValueAssistant<TargetType>]? = [])
Parameters
assistants
An optional array of
ValueAssistant
objects to which the ValueAssistantGroup should delegateValueAssistant
method calls.
-
Adds a
ValueAssistant
to the group.Note
The added assistant will be assigned the same values foradditive
andadditiveWeighting
as this group’s values.Seealso
additive, additiveWeightingDeclaration
Swift
@MainActor public func add(_ assistant: any ValueAssistant<TargetType>)
Parameters
assistant
A
ValueAssistant
object.
-
Declaration
Swift
@MainActor public func generateProperties<StateType>(targetObject target: TargetType, state: MotionState<TargetType, StateType>) throws -> [PropertyData<TargetType>]
-
Declaration
Swift
@MainActor public func update(properties: [PropertyData<TargetType> : Double], targetObject: TargetType)
-
Declaration
Swift
@MainActor public func supports(_ object: Any) -> Bool
-
Declaration
Swift
@MainActor public func acceptsKeypath(_ object: AnyObject) -> Bool