Core animation stops when the Master of the split viewcontroller hide in
portrait mode?
I applied the blinking animation to the contentView of the tableViewcell
for a table in First viewController of the splitviewController. My problem
is, the animation stops when I hide the FirstViewcontroller with
presentsWithGesture property of splitViewController
I have subclassed UItableViewCell and I add animation while setting a
property and I added the animation to the contentView of cell like below
-(void)setProperty:(Property *)aProperty
{
_property=aProperty;
[self.contentView addSubview:self.dateLabel];
self.dateLabel.text=[self.meeting stringforScheduleDate];
if (_property.opened) {
CABasicAnimation *theAnimation;
CALayer *layer=[self.contentView layer];
theAnimation=[CABasicAnimation animationWithKeyPath:@"opacity"];
theAnimation.duration = 0.5;
theAnimation.delegate=self;
theAnimation.fromValue = [NSNumber numberWithFloat:0.0];
theAnimation.toValue = [NSNumber numberWithFloat:1.0];
theAnimation.repeatCount=HUGE_VALF;
theAnimation.autoreverses=YES;
// [layer removeAnimationForKey:@"opacity"];
[layer addAnimation:theAnimation forKey:@"opacity"];
}
else
{
CALayer *layer=[self.contentView layer];
[layer removeAnimationForKey:@"opacity"];
}
}
No comments:
Post a Comment