Reputation: 12444
In my app I want to add a custom transition when switching views. Since its a game, I want to go to the Play view by fading to black then eventually fading into the Play.xib. So how would I do that? Also are there any cool transitions that would work going (for a game) to go to other views so my app looks a bit better? I just need some assistance in this.
Thanks!
Upvotes: 0
Views: 213
Reputation: 125007
To fade in or out, put a view with a black background behind your view. Then use Core Animation to animate the alpha
property of your view from 1.0 (fully opaque) to 0.0 (completely tranparent). Remove the old view and replace it with the new one (with it's alpha set to 0.0). Then again use Core Animation to animate the change of the new view's alpha from 0.0 to 1.0.
Upvotes: 1