1
問題:如果包含應用了以下動畫的UIView的ViewController被釋放,會導致內存泄漏還是保留循環?此CAAnimation會導致泄漏或保留循環嗎?
換句話說,如果我將這個動畫應用到uiview,當uiview的父VC被解散或釋放時,是否會導致內存泄漏或保留週期?
+(CAAnimation*)fadeOfRoomStatusLabel
{
//Customize animation
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"opacity"];
animation.FromValue = [NSNumber numberWithFloat:0.2f];
animation.toValue = [NSNumber numberWithFloat:1.0f];
animation.autoreverses = YES;
//animation.BeginTime = CACurrentMediaTime()+.8;
//animation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseOut];
animation.removedOnCompletion = NO;
animation.duration = 1;
animation.repeatCount = 99;
return animation;
}