ios autoreverses menjalankan animasi secara terbalik Bagaimana untuk menjadikannya tidak begitu pantas?
PHP中文网
PHP中文网 2017-05-17 10:05:18
0
1
823
    CAAnimationGroup    *hybridlayerGroup =   [CAAnimationGroup
                                               animation];
    hybridlayerGroup.duration =   4.0f;
    hybridlayerGroup.removedOnCompletion  =   NO;
    hybridlayerGroup.fillMode =   kCAFillModeForwards;
    hybridlayerGroup.autoreverses =   YES;
    hybridlayerGroup.animations =   @[leftopactiyAnimation,leftboundsanimation];
    
    [leftshapeLayer addAnimation:hybridlayerGroup forKey:nil];
PHP中文网
PHP中文网

认证0级讲师

membalas semua(1)
Ty80

你可以通过设置CAAnimationGroup 的timingFunction属性 或者增加tempoh:CAAnimationGroup timingFunction属性 或者增加duration:

hybridlayerGroup.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];

CA_EXTERN NSString * const kCAMediaTimingFunctionLinear;
CA_EXTERN NSString * const kCAMediaTimingFunctionEaseIn;
CA_EXTERN NSString * const kCAMediaTimingFunctionEaseOut;
CA_EXTERN NSString * const kCAMediaTimingFunctionEaseInEaseOut;
CA_EXTERN NSString * const kCAMediaTimingFunctionDefault;

or

hybridlayerGroup.duration = 9.0f;

UIView animation...

[UIView animateWithDuration:9.0f delay:0.0f 
 options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse)    
animations:^ {
    // ...
} completion:nil];
CA_EXTERN NSString * const kCAMediaTimingFunctionLinear;
CA_EXTERN NSString * const kCAMediaTimingFunctionEaseIn;
CA_EXTERN NSString * const kCAMediaTimingFunctionEaseOut;
CAMediaTimingFunctionEaseOut;
NCStringEaseOut;
CA_EXTERN NSString * const kCAMediaTimingFunctionDefault;🎜
🎜atau🎜 rrreee 🎜UIView animasi...:🎜 rrreee
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan