I'm trying to present a view controller modally, with a transparent background. My goal is to let both the presenting and presented view controllers's view to be displayed at the same time. The problem is, when the presenting animation finishes, the presenting view controller's view disappears.
ModalViewController *modalVC = [[ModalViewController alloc] init];
[self presentViewController:modalVC animated:YES completion:nil];
This following code only works on the iPad.
self.view.backgroundColor = [UIColor clearColor]; self.modalPresentationStyle = UIModalPresentationCurrentContext; [self presentModalViewController:modalVC animated:YES];
I would go with adding a sub view.
Here is a very good discussion. Look at the comments specifically. Not only the answer.
If I were you I wouldn't do it. I would add a sub view and do it. It seems to give me a better control over things.