Created
December 21, 2016 08:55
-
-
Save andresbrun/27fdc8cb47c9f7a7bda7f6eaa5065288 to your computer and use it in GitHub Desktop.
Shows how to apply a continuous push
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let pushContinousBehaviour = UIPushBehavior(items: [targetView], mode: .continuous) | |
animator.addBehavior(pushContinousBehaviour) | |
// Using pushDirection | |
pushContinousBehaviour.pushDirection = CGVector(dx: 50, dy: 0) | |
// Using magnitude and angle | |
pushContinousBehaviour.magnitude = 50 | |
pushContinousBehaviour.angle = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment