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
{{ message }}
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
Copy file name to clipboardexpand all lines: README.md
+113
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,119 @@ Note: any animatable property can also be animated with MotionAnimator's explici
47
47
48
48
> Is a property missing from this list? [We welcome pull requests](https://github.com/material-motion/motion-animator-objc/edit/develop/src/MDMAnimatableKeyPaths.h)!
49
49
50
+
## MotionAnimator: a drop-in replacement
51
+
52
+
UIView's implicit animation APIs are also available on the MotionAnimator:
view.layer.cornerRadius=10// Works on iOS 8 and up
75
+
})
76
+
```
77
+
78
+
MotionAnimator makes use of the [MotionInterchange](https://github.com/material-motion/motion-interchange-objc), a standardized format for representing animation traits. This makes it possible to tweak the traits of an animation without rewriting the code that ultimately creates the animation, useful for building tweaking tools and making motion "stylesheets".
79
+
80
+
```swift
81
+
// Want to change a trait of your animation? You'll need to use a different function altogether
Springs on iOS require an initial velocity that's normalized by the displacement of the animation. MotionAnimator calculates this for you so that you can directly provide gesture recognizer velocity values:
133
+
134
+
```swift
135
+
// Common variables
136
+
let gestureYVelocity = gestureRecognizer.velocity(in: someContainerView).y
0 commit comments