views:

44

answers:

1

Hello. I have a view being displayed modally and, before I display it, I set it's background color to transparent...

- (void)viewDidAppear:(BOOL)animated
{
 [super viewDidAppear:animated];

 MyViewController_iPhone *myVC = [[MyViewController_iPhone alloc] initWithNibName:@"MyView" bundle:nil];
 [myVC.view setBackgroundColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:0.0]]
 [[self navigationController] presentModalViewController:myVC animated:YES];
 [myVC release];
}

As the view animates up onto the screen, the background is transparent, but as soon as it finishes animating upward, the view's background goes back to the original opaque white color, why?

Thanks in advance for your help!

+1  A: 

According to this post http://stackoverflow.com/questions/2578614/transparent-background-with-a-modal-uiviewcontroller it cannot be done. What are you trying to end up with?

This link seems to describe what you're trying to achieve. http://doganberktas.com/2010/05/18/adding-transparent-modal-view-programatically-iphone/

Convolution