Benutzerdefinierte Segue-Animation

Ich versuche ein benutzerdefiniertes Segment zu verwenden, um eine Art Zoom-Animation durchzuführen. Wenn der Übergang ausgeführt wird, wird der sourceViewController schwarz und der Zoom wird ausgeführt.

Versucht auch den pushViewController zu setzen: in den Vervollständigungsblock aber der Übergang wird überhaupt nicht ausgeführt.

- (void)perform {

    UIViewController *sourceViewController = (UIViewController *) self.sourceViewController;
    UIViewController *destinationViewController = (UIViewController *) self.destinationViewController;

    [destinationViewController.view setTransform:CGAffineTransformMakeScale(0.5,0.5)];
    [destinationViewController.view setAlpha:0.0];

    [UIView animateWithDuration:0.5
                          delay:0.0
                        options:UIViewAnimationCurveEaseOut 
                     animations:^{
                         [destinationViewController.view setTransform:CGAffineTransformMakeScale(1.0,1.0)];
                         [destinationViewController.view setAlpha:1.0];
                         [sourceViewController.navigationController pushViewController:destinationViewController animated:NO];
                     } 
                     completion:^(BOOL finished){
                     }];

}

Was mache ich falsch?

Antworten auf die Frage(1)

Ihre Antwort auf die Frage