通过添加具有阻力的 UIDynamicItemBehavior,我可以轻松地使捕捉变慢。但是,阻力的默认值是 0.0,这对我来说仍然太慢了。将阻力设置为负值没有效果,它的移动速度似乎快到 0.0。
如何使 UISnapBehavior 更快?
(这里是一个让捕捉变慢的例子):
UIDynamicItemBehavior *dynamicItemBehavior = [[UIDynamicItemBehavior alloc] initWithItems:@[button]];
dynamicItemBehavior.resistance = 50.0; // This makes the snapping SLOWER
UISnapBehavior *snapBehavior = [[UISnapBehavior alloc] initWithItem:button snapToPoint:point];
[self.animator addBehavior:button.dynamicItemBehavior];
[self.animator addBehavior:button.snapBehavior];