Search code examples
iosuiviewuikituidynamicbehavior

Adding spin on a UIDynamicItemBehavior initially


I spawn a UIView every nth second at the top of the screen, but I'd like it to have some initial spin as it falls, rather than only if it hits something on the way.

Can anyone recommend a way of doing this as I can't see anything obvious in the documentation? Maybe I'm overlooking something.

Thanks.


Solution

  • UIDynamicItemBehavior's addAngularVelocity:forItem: will give it spin.