애니메이션에서 지정하는 힘을 변경하여 느리게 움직일 수 있습니다. 당신이 충돌이 진행 한 경우
self.animator = UIDynamicAnimator(referenceView: self.view)
var gravity = UIGravityBehavior(items: [animatedView])
gravity.magnitude = 0.5
, 당신은 또한 마찰을 증가시킬 수 및/또는 탄성이 있지만 어떤 경우에는이 수, 일을 천천히 : 예를 들어, 가속 속도를 느리게하는 중력의 크기를 변경할 수 있습니다 궤적에 영향을 미칩니다 :
let bounceProperties = UIDynamicItemBehavior(items: [animatedView])
bounceProperties.elasticity = 0.5
bounceProperties.friction = 0.2
var collision = UICollisionBehavior(items: [animatedView])
var boundaryId: NSMutableString = NSMutableString(string: "bottomBoundary")
let boundaryPath = UIBezierPath(rect: boundaryFrame)
collision.addBoundaryWithIdentifier(boundaryId, forPath: boundaryPath)
// Start animating
animator.addBehavior(gravity)
animator.addBehavior(collision)
animator.addBehavior(bounceProperties)
애니메이션을 수행하는 데 사용하는 애니메이션 블록에 더 긴 지속 시간을 사용할 수 없습니까 (animateWithDuration : .... 메소드 중 하나를 사용하고 있습니까)? – rdelmar
아니요, 애니메이션을 직접 사용하지 않습니다. UIDynamicAnimator가 나를 대신하기 때문입니다. – benvolioT