iPhone modal View with alpha transparency?
- by Moshe
I am adding a modal view using the following code:
[self presentModalViewController:phrasesEditor animated:YES];
How can I make the modal view semi-transparent so that the superview "shines" through?
My complete method/function looks like this:
-(IBAction)showEditPhrases:(id)sender{
PhrasesViewController *phrasesEditor = [[PhrasesViewController alloc] initWithNibName:@"PhrasesViewController" bundle:nil];
phrasesEditor.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[phrasesEditor.view setAlpha: 0.5];
[phrasesEditor.view setBackgroundColor: [UIColor clearColor]];
[self presentModalViewController:phrasesEditor animated:YES];
[phrasesEditor release];
}