Why doesn't my UIView remain transparent after it finishes loading?
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开发者_C百科 the original opaque white color, why?
Thanks in advance for your help!
According to this post 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/
精彩评论