uiview CGAffineTransform animates backwards
<p>I have a <code>UIView</code> subclass which I am able to successfully use <code>UIView</code> animations on.</p>

<p>This <code>UIView</code> also has subviews, which I also want to be able to <code>UIView</code> animate.</p>

<p>However, it seems that whenever I create an animation and apply it to the parent view it works fine, but if I apply the animation to the child view it animates backwards.</p>

<p>For example, if I scale my <code>UIView</code> parent(self) by a factor of 2 (to double the width and height):</p>

<pre><code>[UIView beginAnimations:nil context:nil];
[UIView setAnimationDelegate: self];
[UIView setAnimationDuration:2];
[UIView setAnimationDelay:2];

CGAffineTransform scaleTransform = CGAffineTransformScale( self.transform, 2, 2  );
self.transform = scaleTransform;
[UIView commitAnimations];
</code></pre>

<p>then this works fine.</p>

<p>But if I do the same on the child:</p>

<pre><code>UIView *myObj = [[self subviews] objectAtIndex:0];

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDelegate: self];
[UIView setAnimationDuration:2];
[UIView setAnimationDelay:2];

CGAffineTransform scaleTransform = CGAffineTransformScale( myObj.transform, 2, 2  );
myObj.transform = scaleTransform;
[UIView commitAnimations];
</code></pre>

<p>It doesn't work. What happens visually is that the child view immediately shrinks down and then after the delay scales back up to it's original size.</p>

<p>If I log the transform parameters it looks the same for both parent and child and I have tried setting <code>CGAffineTransformIdentity</code>.</p>

<p>Any ideas what might be the problem?</p>
