Hello, I have this View class. It adds subviews to itself and then I want to do a CATransform3DMakeRotation on one of them (the last one added with addSubiew). Its on top but as soon as the animation starts it is underneath the oder views. Here is my CATransform3DMakeRotation code:
CABasicAnimation *topAnim = [CABasicAnimation animationWithKeyPath:@"transform"];
topAnim.duration=3.3;
topAnim.repeatCount=0;
topAnim.fromValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(0.0, 0, 0, 0)];
float f = DegreesToRadians(180); // -M_PI/1;
topAnim.toValue=[NSValue valueWithCATransform3D:CATransform3DMakeRotation(f, 1,1, 0)];
//topAnim.delegate = self;
topAnim.removedOnCompletion =NO;
topAnim.fillMode = kCAFillModeForwards;
[[KuvertLasche layer] addAnimation:topAnim forKey:@"flippy"];
What am I doing wrong? Edit: This view is in a subview with a bunch of other views:
- self.view
- letterView (with 3 subviews. ontop of them is the KuvertLasche)
if i take it out of the letterView and place it on self.view above the letterView it goes half way and then goes under the other views. Very strange. Any advice?