Skip to content

Instantly share code, notes, and snippets.

@andresbrun
Created December 21, 2016 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andresbrun/27fdc8cb47c9f7a7bda7f6eaa5065288 to your computer and use it in GitHub Desktop.
Save andresbrun/27fdc8cb47c9f7a7bda7f6eaa5065288 to your computer and use it in GitHub Desktop.
Shows how to apply a continuous push
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