我手动显示虹膜动画:
- (void)playPictureTakenAnimation {
CATransition *animation = [CATransition animation];
animation.type = @"cameraIris";
animation.duration = 0.8f;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
irisAinmationView.opaque = 1.0f;
[irisAinmationView.layer addAnimation:animation forKey:@"transitionViewAnimation"];
}
我需要暂停动画,直到拍摄照片并进行处理,例如:
答案 0 :(得分:1)
要控制起点和终点,请使用:
animation.startProgress = 0.0; // start
animation.endProgress = 0.5; // halfway
和
animation.startProgress = 0.5; // halfway
animation.endProgress = 1.0; // end
同时:
- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag
动画停止时控制。