Re: Animated subviews

2008-11-24 Thread David Duncan
On Nov 23, 2008, at 9:54 AM, DKJ wrote: Now I'm getting a very odd result. In the code for a UIView I have this: CALayer *theLayer = self.layer; id pLayer = [theLayer presentationLayer]; The first line is fine, but for the second I get a compiler warning: no

Animated subviews

2008-11-23 Thread DKJ
I have two subviews sv1 and sv2 that I've animated by setting their center properties inside of an animation block. This animation code is in sv1.m and sv2.m. It all works just fine: they both move smoothly around in the superview by choosing new centre points in a continuous loop. It

Re: Animated subviews

2008-11-23 Thread Wyatt Webb
I have not done this myself, but I understand that you can find the actual positions of things in the middle of an animation by querying the [ [ myView layer ] presentationLayer ]. This is a version of the layer that has all of the current values in the middle of an animation. As long as

Re: Animated subviews

2008-11-23 Thread DKJ
On 23-Nov-08, at 9:11 , Wyatt Webb wrote: I have not done this myself, but I understand that you can find the actual positions of things in the middle of an animation by querying the [ [ myView layer ] presentationLayer ]. This is a version of the layer that has all of the current values

Re: Animated subviews

2008-11-23 Thread DKJ
Now I'm getting a very odd result. In the code for a UIView I have this: CALayer *theLayer = self.layer; id pLayer = [theLayer presentationLayer]; The first line is fine, but for the second I get a compiler warning: no '-presentationLayer' method found I'm looking at

Re: Animated subviews

2008-11-23 Thread DKJ
Despite the compiler warning, this code: CGRect cr = [[self.layer presentationLayer] frame]; NSLog( @%.1f %.1f, CGRectGetMidX( cr ), CGRectGetMidY( cr ) ); gives me just what I hoped for. I have the animation delegate start a timer when the animation begins, and the timer