Présentez un UIViewController modal transparent

Je suis en train de faire un custom alertView (pour iOS7+) sur mon propre mais j'ai du mal avec le alertView présentation.

J'ai un UIViewController avec un fond noir (alpha fixé à 0,25 f), et un alertView comme sous-vue.

Quand je veux afficher la alertView, je vous présente modal le viewController:

-(void) show 
{
    UIWindow* window = [[UIApplication sharedApplication] keyWindow];
    self.modalTransitionStyle = UIModalPresentationCustom;
    self.transitioningDelegate = self;
    [window.rootViewController presentViewController:self animated:YES completion:nil];
}

Et voici mon animateur de l'objet:

-(NSTimeInterval) transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext
{
    NSLog(@"%s",__PRETTY_FUNCTION__);
    return 2;
}

-(void) animateTransition:(id<UIViewControllerContextTransitioning>)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];
    }];
}

La chose est: le modal VC est en train de disparaître avec la présentation de la VC en arrière-plan comme sa censés faire, mais lorsque l'animation se termine la présentation de VC est retiré de l'arrière-plan.

Si je l'appelle [transitionContext completeTransition:YES]; au lieu de cela, la présentation de VC est en arrière-plan, mais le modal VC est retiré à la fin de l'animation, donc je suppose que le contexte annule la présentation si nous envoyons un "NON".

Est-il un moyen de garder la présentation de la VC en arrière-plan, sans avoir à faire un bilan et de définir comme arrière-plan de la modale de VC en vue?

source d'informationauteur Imotep