Custom Segue Animation

Ich bin versucht, eine custom segue Ausführung einer Art von zoom-animation.
Wenn der übergang ausgeführt wird, werden die sourceViewController geht schwarz, dann die zoom-Auftritt.

Bemühte sich auch um die pushViewController: in den Abschluss-block, aber der übergang ist ü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 ?

InformationsquelleAutor Nimrod7 | 2012-05-28

Schreibe einen Kommentar