I'm doing an animation where I'm moving and scaling an image at the same time. I want to move the image onto a toolbar button in the top navigation bar. It scales down to zero as it does this so it looks like the image is being saved to that location....similar to what happens when you download a song in iTunes on the iPhone. My scaling and the translation are working fine, however the image disappears under the navigation bar. I want it to translate on top of the navigation bar and then disappear.
Does anyone know how I can tell my animation not to go under the navigation bar? My code is below. Thanks Brian
CGAffineTransform translate = CGAffineTransformMakeTranslation(160, -160);
CGAffineTransform scale = CGAffineTransformMakeScale(0.1, 0.1);
CGAffineTransform transform = CGAffineTransformConcat(scale, translate);
//transform = CGAffineTransformRotate(transform, 20);
[UIView beginAnimations:@"MoveAndScaleAnimation" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:1.0];
imageView.transform = transform;
[UIView commitAnimations];