1

When animating a transition to another view I am using the following code:

[UIView beginAnimations:@"transition" context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
        forView:self.navigationController.view cache:NO];
[self.navigationController pushViewController:newView animated:NO];
[UIView commitAnimations];

This works fine but during the flip animation there is a solid white background behind the animation. I was wondering if anyone knows a simple way to change the color of this background behind the animation. Thanks!

zzzzzz
  • 493
  • 2
  • 12

2 Answers2

3

It's should be the backgroundColor of your UIWindow or keyWindow.rootViewController.view.

Set the backgroundColor of every view below your animated view to [UIColor blackColor] should solve your problem (don't forget the UIWindow's backgroundColor too).

xuzhe
  • 5,100
  • 22
  • 28
0

I think the solid white background you see behind the animation is just the background color of whatever view is underneath. Simply changing the background color of that view (view.backgroundColor = [UIColor blackColor] or something like that) should change what you see underneath.

Mark Armstrong
  • 819
  • 6
  • 9