PropertyData

public struct PropertyData

This struct represents a single property or object and information about the state of its value interpolation, as well as metadata which allows a Motion instance to get and set these values.

  • The starting value of the motion operation.

    Remark

    Note that for non-numeric properties like structs this may affect multiple values, such as the x and y properties of CGPoint.

    Seealso

    current, end

    Declaration

    Swift

    internal(set) public var start: Double
  • The current value of the motion operation. (read-only)

    Remark

    Note that for non-numeric properties like structs this may affect multiple values, such as the x and y properties of CGPoint.

    Seealso

    start, end

    Declaration

    Swift

    internal(set) public var current: Double = 0.0
  • end

    The ending value of the motion operation.

    Remark

    Note that for non-numeric properties like structs this may affect multiple values, such as the x and y properties of CGPoint.

    Declaration

    Swift

    internal(set) public var end: Double = 0.0
  • If true, a Moveable class should use the object’s property’s current value as the starting value.

    Remark

    This is set to true when no value is passed into the initializer’s start property.

    Declaration

    Swift

    internal(set) public var useExistingStartValue: Bool = false
  • The target object whose property should be modified.

    Remark

    If the object passed in to the Motion instance is an NSValue instance, this value will be nil. In that case, the target property will contain the current NSValue.

    Seealso

    target

    Declaration

    Swift

    public weak var targetObject: NSObject?
  • The keyPath of the property to be transformed. The keyPath must be a valid, KVC-compliant keyPath of targetObject. For your own classes, you must flag the property with @objc for Swift to find it.

    Seealso

    targetObject

    Declaration

    Swift

    public var path: String = ""
  • The property to be modified.

    Declaration

    Swift

    public var target: AnyObject?
  • The change in value from the last property value update.

    Declaration

    Swift

    internal(set) public var delta: Double = 0.0
  • A delegate that listens for property updates from this instance.

    Declaration

    Swift

    public var delegate: PropertyDataDelegate?
  • Initializer.

    Declaration

    Swift

    public init(path: String?, start: Double?=nil, end: Double)

    Parameters

    path

    The keypath of the property to modify, relative to the targetObject.

    start

    An optional starting value for the motion. If none is provided, useExistingStartValue will be set to true.

    end

    The ending value of the motion.

  • Declaration

    Swift

    public init(_  _path: String?, _ _end: Double)
  • Declaration

    Swift

    public init(_ path: String?)
  • Declaration

    Swift

    public init(end: Double)