Have subviews using UIGravityBehavior have different gravity

101 Views Asked by At

I've got a viewController with a set of subviews. Currently, the gravity is the same for all of them. I want to be able to set different gravity direction values for each subview. Could someone show me how to do this?

Thanks in advance

EDIT: Currently getting this output in the console "Multiple gravity behavior per animator is undefined and may assert in the future"

1

There are 1 best solutions below

0
On BEST ANSWER

Created an array of UIDynamicAnimator and UIGravityBehavior objects and now it works