Resizing a UIDynamicItem

708 views Asked by At

Is there a simple way to handle the resizing of a UIView controlled by UIKit Dynamics? I am aware of UIDynamicAnimator's updateItemUsingCurrentState: method, but the documentation seems to point out that this is for position and rotation changes only. When I call this method after a bounds change, the physical model continues to work as if the size hasn't changed.

This is for a fairly simple UI scenario: a UIView containing a UILabel with text that changes depending on user input and can grow/shrink slightly (think of a callout view on a map), with a UICollisionBehavior to keep inside its superview and a UISnapBehavior to animate its placement.

I realise that size changes aren't so simple in a physical model, but given that it's quite common in UI scenarios and that UIKit Dynamics appears to handle screen orientation changes automagically, I'm hoping there is support for it.

0

There are 0 answers