1

How can we customize the gravity of each item of UIGravityBehavior, like:
gravity.gravityDirection.dy = 0.7 ( for some items )
gravity.gravityDirection.dy = 0.3 ( for others)

my code is:

gravity = UIGravityBehavior(items: items)
gravity.gravityDirection = CGVector(dx: 0, dy: 0.3)
animator.addBehavior(gravity)
Hassan Taleb
  • 2,350
  • 2
  • 19
  • 24

0 Answers0