I am trying to make a view slide from top to bottom. This is not a big deal, I used CABasicAnimation
for this. The problem is when I want to remove the view. I
Might want to set these properties. They cause the presentation to be preserved at the end of the animation.
animation.fillMode = kCAFillModeForwards;
animation.removedOnCompletion = NO;
Then the "animationDidStop:" method can be used to remove the view at the end of the animation:
-(void) animationDidStop:(CAAnimation *) animation finished:(bool) flag {
if (animation == [containerView.layer animationForKey:@"moveX"]) {
// remove view here, add another view and/or start another transition
}
}