Overview
An object that represents an instance of a view model, used to update bindings at runtime.A strong reference to this instance must be maintained if it is being bound to a state machine or artboard, or for observability. If a property is fetched from an instance different to that bound to an artboard or state machine, its value or trigger will not be updated.
Properties
name
propertyCount
properties
Methods
propertyFromPath:
path- The path to the property.
nil.
Unlike a
RiveViewModel.Instance, a strong reference to this type does not have to be made. If the property exists, the underlying property will be cached, and calling this function again with the same path is guaranteed to return the same object.stringPropertyFromPath:
path- The path to the string property.
nil.
Unlike a
RiveViewModel.Instance, a strong reference to this type does not have to be made. If the property exists, the underlying property will be cached, and calling this function again with the same path is guaranteed to return the same object.numberPropertyFromPath:
path- The path to the number property.
nil.
Unlike a
RiveViewModel.Instance, a strong reference to this type does not have to be made. If the property exists, the underlying property will be cached, and calling this function again with the same path is guaranteed to return the same object.booleanPropertyFromPath:
path- The path to the boolean property.
nil.
Unlike a
RiveViewModel.Instance, a strong reference to this type does not have to be made. If the property exists, the underlying property will be cached, and calling this function again with the same path is guaranteed to return the same object.colorPropertyFromPath:
path- The path to the color property.
nil.
Unlike a
RiveViewModel.Instance, a strong reference to this type does not have to be made. If the property exists, the underlying property will be cached, and calling this function again with the same path is guaranteed to return the same object.enumPropertyFromPath:
path- The path to the enum property.
nil.
Unlike a
RiveViewModel.Instance, a strong reference to this type does not have to be made. If the property exists, the underlying property will be cached, and calling this function again with the same path is guaranteed to return the same object.viewModelInstancePropertyFromPath:
path- The path to the view model instance property.
nil.
Unlike a
RiveViewModel.Instance, a strong reference to this type does not have to be made. If the property exists, the underlying property will be cached, and calling this function again with the same path is guaranteed to return the same object.setViewModelInstancePropertyFromPath:toInstance:
path- The path to the view model property to replace.instance- The instance to replace the view model property atpathwith.
true if the view model instance was replaced, otherwise false.
triggerPropertyFromPath:
path- The path to the trigger property.
nil.
Unlike a
RiveViewModel.Instance, a strong reference to this type does not have to be made. If the property exists, the underlying property will be cached, and calling this function again with the same path is guaranteed to return the same object.imagePropertyFromPath:
path- The path to the image property.
nil.
Unlike a
RiveViewModel.Instance, a strong reference to this type does not have to be made. If the property exists, the underlying property will be cached, and calling this function again with the same path is guaranteed to return the same object.listPropertyFromPath:
path- The path to the list property.
nil.
Unlike a
RiveViewModel.Instance, a strong reference to this type does not have to be made. If the property exists, the underlying property will be cached, and calling this function again with the same path is guaranteed to return the same object.artboardPropertyFromPath:
path- The path to the artboard property.
nil.
Unlike a
RiveViewModel.Instance, a strong reference to this type does not have to be made. If the property exists, the underlying property will be cached, and calling this function again with the same path is guaranteed to return the same object.