I am using a UISnapBehavior but it is snapping too quickly for my liking. Is there a way to slow it down? Or in other words: is there a way to adjust the elasticity of the object with the point where it should snap to?
I was able to solve this by attaching the view to a UIDynamicItemBehavior
as well and setting the resistance
property.
UIDynamicItemBehavior *dynamicItemBehavior = [[UIDynamicItemBehavior alloc] initWithItems:@[ view ]];
dynamicItemBehavior.resistance = 100;
[animator addBehavior:dynamicItemBehavior];
Try setting the behaviour's damping
property to a number > 1.0. The header says damping
should remain in [0.0, 1.0]
however values larger than 1.0 seem to work fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With