2011-10-04 10 views

Respuesta

2

Puede iniciar una nueva animación básica con diferente velocidad y tomar como valor inicial el que recibe de la capa de presentación.

4

Se puede ver https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreAnimation_guide/AdvancedAnimationTricks/AdvancedAnimationTricks.html#//apple_ref/doc/uid/TP40004514-CH8-SW2

Y utilizar este código.

Objective-C

self.layer.timeOffset = [self.layer convertTime:CACurrentMediaTime() fromLayer:nil]; 
self.layer.beginTime = CACurrentMediaTime(); 
self.layer.speed= theSpeedYouWant; 

Swift

self.layer.timeOffset = self.layer.convertTime(CACurrentMediaTime(), fromLayer: nil) 
self.layer.beginTime = CACurrentMediaTime(); 
self.layer.speed = speed; 
+0

muchas gracias. Realmente me ayudó – ShineWang

Cuestiones relacionadas