You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Refactored the "finalState" convenience initializer for the Motion class to now take an Array of PropertyStates objects. This allows you to provide both starting and ending representational value objects for easy animation properties creation. Most of the ValueAssistant objects had significant updates to support this.
- A new "buildPropertyData(fromObject: AnyObject, propertyStates: [PropertyStates])" public method has been added to the Motion class, which creates and returns an array of PropertyData objects. This method is used in conjunction with the above convenience initializer, but can be called ad hoc to generate PropertyData objects from a set of state objects you pass in.
- Bugfix: ValueAssistants now won't exclude properties from being created when the ending value is the same as the object's original value, but the specified starting value is different.
- Minor updates for Swift 4 compatibility. The Examples and Tests projects now target Swift 4.
- Updated tests, and additional test coverage for ValueAssistant classes.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,10 @@
1
+
#### 1.3.0
2
+
- Refactored the "finalState" convenience initializer for the Motion class to now take an Array of PropertyStates objects. This allows you to provide both starting and ending representational value objects for easy animation properties creation. Most of the ValueAssistant objects had significant updates to support this.
3
+
- A new "buildPropertyData(fromObject: AnyObject, propertyStates: [PropertyStates])" public method has been added to the Motion class, which creates and returns an array of PropertyData objects. This method is used in conjunction with the above convenience initializer, but can be called ad hoc to generate PropertyData objects from a set of state objects you pass in.
4
+
- Bugfix: ValueAssistants now won't exclude properties from being created when the ending value is the same as the object's original value, but the specified starting value is different.
5
+
- Minor updates for Swift 4 compatibility. The Examples and Tests projects now target Swift 4.
6
+
- Updated tests, and additional test coverage for ValueAssistant classes.
* Initializer. Using this convenience method, you can pass in objects of the value type you're modifying without having to manually create `PropertyData` objects for each object property you wish to modify. For instance, if you're modifying a CGRect object, you can provide CGRect objects that represent its starting and ending states and it will handle the setup for all the properties of the CGRect that have changed between the two states.
547
547
*
548
548
* - parameters:
549
549
* - target: The target object whose properties should be modified.
550
-
* - finalState: A Dictionary of template objects, with keys representing property keypaths (relative to the target object), and values that represent their final states. These final states must be of the same object type as the property located at the keypath.
550
+
* - statesForProperties: An Array of `PropertyStates` objects which represent property keypaths (relative to the target object), and values that represent their starting and ending states. By using `PropertyStates` objects, you can pass in objects of the value type you're modifying without having to manually create `PropertyData` objects for each object property you wish to modify. Please see the `PropertyStates` documentation for usage information.
551
551
* - duration: The length of the motion, in seconds.
552
552
* - easing: An optional `EasingUpdateClosure` easing equation to use when moving the values of the given properties. `EasingLinear.easeNone()` is the default equation if none is provided.
@@ -710,7 +675,7 @@ public class Motion: Moveable, Additive, TempoDriven, PropertyDataDelegate {
710
675
*
711
676
* - remark: When this method is used there is no need to specify `.Reverse` in the `options` parameter of the init method.
712
677
*
713
-
* - parameter easing: The easing equation to be used while reversing. When no equation is provided, the normal `easing` closure will be used in both movement directions.
678
+
* - parameter withEasing: The easing equation to be used while reversing. When no equation is provided, the normal `easing` closure will be used in both movement directions.
714
679
* - returns: A reference to this Motion instance, for the purpose of chaining multiple calls to this method.
715
680
* - seealso: reversing, reverseEasing
716
681
*/
@@ -723,6 +688,64 @@ public class Motion: Moveable, Additive, TempoDriven, PropertyDataDelegate {
723
688
}
724
689
725
690
691
+
/**
692
+
* Builds `PropertyData` objects for the supplied PropertyStates objects.
693
+
*
694
+
* - parameter forObject: The object to be modified, and the base object for the paths of the `PropertyStates` objects.
695
+
* - parameter propertyStates: An Array of `PropertyStates` objects that define how the `PropertyData` objects are constructed.
696
+
* - remark: This method is used internally by the initializer when the `statesForProperties` convenience method is used, but you can also call it directly to build an array of `PropertyData` objects.
0 commit comments