Darkening UIView while flipping over using UIViewAnimationTransitionFlipFromRight
- by Alexander Repty
I'm using a standard animation block to flip over from one view to another, like this:
[UIView beginAnimations:@"FlipAnimation" context:self];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:NO];
[UIView setAnimationBeginsFromCurrentState:NO];
[containerView exchangeSubviewAtIndex:1 withSubviewAtIndex:0];
[UIView commitAnimations];
During the animation's course, the "from" view darkens as it begins to flip over. Since I'm using nearly identical views on both sides which don't cover the whole view (it's meant to represent a physical card being flipped over), this looks absolutely horrible. Using [UIColor clearColor] as the backgroundColor property for every associated UIView didn't help one bit as transparent areas seem to get darkened as well.
Any ideas on how I could get rid of this darkening effect?