Slowing down UISnapBehavior

I use UISnapBehavior, but it switches too fast to my liking. Is there any way to slow it down? Or, in other words: is there a way to adjust the elasticity of an object with a point where it should snap?

+8
ios7 uikit-dynamics uidynamicbehavior uisnapbehavior
source share
2 answers

I managed to solve this problem by adding a view to UIDynamicItemBehavior and setting the resistance property.

 UIDynamicItemBehavior *dynamicItemBehavior = [[UIDynamicItemBehavior alloc] initWithItems:@[ view ]]; dynamicItemBehavior.resistance = 100; [animator addBehavior:dynamicItemBehavior]; 
+14
source share

Try damping behavior property to a number> 1.0. The header says that damping should remain at [0.0, 1.0] , but values ​​greater than 1.0 seem to work.

+2
source share

All Articles