0
votes

I have applied a CABasicAnimation to a layer. The animation modifies the "position.y" layer property to create a gentle bouncing effect; it is set to autoreverse and repeat.

I use the From and To values to position the animation in the bottom right quadrant of the screen. It works quite nicely until I change the orientation of the device. The problem is the animation is positioned relative to the top of the screen. So when the orientation changes it is no longer positioned in the correct place.

The autoresizingMask for the View itself is correctly set in interface builder, but the animation doesn't seem to take any notice of that. I guess because the animation is assigning an absolute value to the layers position.

I'm a bit stumped, thanks in advance.

1
could you provide some code? it is clear that you have to do the math for the animation, we can't help without seeing what you are trying to do...sergio

1 Answers

0
votes

Can you place your animation in a seperate view so it is self contained and then adjust that view with the rotation?