Rumah > Soal Jawab > teks badan
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中文网2017-05-17 10:07:18
你可以通过设置timingFunction
属性 或者增加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;🎜atau🎜 rrreee 🎜
CA_EXTERN NSString * const kCAMediaTimingFunctionEaseIn;
CA_EXTERN NSString * const kCAMediaTimingFunctionEaseOut;
CAMediaTimingFunctionEaseOut;
NCStringEaseOut;
CA_EXTERN NSString * const kCAMediaTimingFunctionDefault;🎜