title: Present a transparent modal UIViewController
body: <p>I'm trying to make a custom alertView (for iOS7+) on my own but I struggle with the alertView presentation.</p>
  
  <p>I have a UIViewController with a black background (alpha set to 0.25f), and a alertView as subview.</p>
  
  <p>When I want to show the alertView, I present modally the viewController:</p>
  
  <pre><code>-(void) show 
  {
      UIWindow* window = [[UIApplication sharedApplication] keyWindow];
      self.modalTransitionStyle = UIModalPresentationCustom;
      self.transitioningDelegate = self;
      [window.rootViewController presentViewController:self animated:YES completion:nil];
  }
  </code></pre>
  
  <p>And here is my animator object:</p>
  
  <pre><code>-(NSTimeInterval) transitionDuration:(id&lt;UIViewControllerContextTransitioning&gt;)transitionContext
  {
      NSLog(@"%s",__PRETTY_FUNCTION__);
      return 2;
  }
  
  -(void) animateTransition:(id&lt;UIViewControllerContextTransitioning&gt;)transitionContext
  {
      NSLog(@"%s",__PRETTY_FUNCTION__);
  
      UIView* toView = [transitionContext viewForKey:UITransitionContextToViewKey];
      toView.alpha = 0;
  
      UIView* container = [transitionContext containerView];
      [container addSubview:toView];
  
      [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{
          toView.alpha = 0.5;
      } completion:^(BOOL finished) {
          [transitionContext completeTransition:YES];
      }];
  }
  </code></pre>
  
  <p>The thing is: the modal VC is fading with the presenting VC in background as its supposed to do, but when the animation ends the presenting VC is removed from the background.</p>
  
  <p>If I call <code>[transitionContext completeTransition:YES];</code> instead, the presenting VC is in background but the modal VC is removed at animation end, so I guess the context cancels the presentation if we send 'NO'.</p>
  
  <p>Is there a way to keep the presenting VC in background without having to make a snapshot of it and set it as background of the modal VC's view?</p>