title: iOS - Semi-transparent modal view controller
body: <p>I want to present a view controller with a slightly transparent background modally over the current view, such that the first view is slightly visible under the modal view.</p>
  
  <p>I set the alpha value of the modal view controller and set the <code>modalPresentationStyle</code> to <code>UIModalPresentationCurrentContext</code>, as suggested in another post. </p>
  
  <p>The result is that the view background is transparent when animating up, but when view controller is in place it changes to opaque black. It goes back to being transparent while animating the dismissal. </p>
  
  <p>How can I get it to be transparent when active ? </p>
  
  <p>I have tested in <code>iOS 6 and 7</code>. The code I am using follows:</p>
  
  <pre><code>MyModalViewController *viewController = [[MyModalViewController alloc] init];
  UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
  [navController setNavigationBarHidden:YES];
  self.navigationController.modalPresentationStyle = UIModalPresentationCurrentContext;
  [self.navigationController presentViewController:navController animated:YES completion:NULL];
  </code></pre>