animate UIImageView with flip animation
<p>I'm a noob in objective-c and cocoa, and I would like to implement a simple animation of UIImageView with flipping animation. But I'm having a hard time doing it. Below are my snippets:</p>

<pre><code>UIView *containerView = [[UIView alloc] initWithFrame:CGRectMake(0,0,33,33)];
UIImageView *img1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:IMG1]];
UIImageView *img2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:IMG2]];         
[containerView addSubview:img1];
[containerView addSubview:img2];
[self.view addSubview:containerView];

CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationDuration:0.75];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:containerView cache:YES];
[containerView exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
[UIView commitAnimations];
</code></pre>

<p>Thanks.</p>
