Hopeful solution:
Set the background color of your main window to black, or whatever the background window/view is for these views. If the views you are trying to transition through are NOT sub-views of any other view, then set the "window" color to black. Then use an animation block to fade them out. I guess CAT would work too, but I haven't messed with much of the Core Animation.
Code:
- (void)fadeScreen
{
[UIView beginAnimations:nil context:nil]; // begins animation block
[UIView setAnimationDuration:0.75]; // sets animation duration
[UIView setAnimationDelegate:self]; // sets delegate for this block
[UIView setAnimationDidStopSelector:@selector(finishedFading)]; // calls the finishedFading method when the animation is done (or done fading out)
view.alpha = 0.0; // Fades the alpha channel of this view to "0.0" over the animationDuration of "0.75" seconds
[UIView commitAnimations]; // commits the animation block. This Block is done.
}
- (void) finishedFading
{
[UIView beginAnimations:nil context:nil]; // begins animation block
[UIView setAnimationDuration:0.75]; // sets animation duration
viewTwo.alpha = 1.0; // fades the view to 1.0 alpha over 0.75 seconds
[UIView commitAnimations]; // commits the animation block. This Block is done.
}
It's worth noting that the animation block will handle smooth alpha fading automatically. So all you have to do is preset your alpha values for your views before each block.