2012-02-19 13 views
4

カスタムSegueを作成して、ViewControllersをカールアップアニメーションと入れ替えることができますが、私は方法を見つけることができません。これは何のために実行されますか?UIViewAnimationOptionTransitionCurlDownでカスタムSegue

私はこの

-(void)perform{ 
    UIViewController *dst = [self destinationViewController]; 
    UIViewController *src = [self sourceViewController];  
    [UIView beginAnimations:nil context:nil]; 
    //change to set the time 
    [UIView setAnimationDuration:1]; 
    [UIView setAnimationBeginsFromCurrentState:YES]; 
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:src.view cache:YES]; 
    [UIView commitAnimations]; 
} 

を持っている。しかし、私はとにかく、あなたの助けに感謝をビューを変更し得ることはありません!

答えて

3

ネヴァーマインドは、私は私がしなければならなかった唯一のことは、ナビゲーションコントローラを追加したレコードに対して、それを解決した後、私は、カスタムのようなsegues使用することができます

- (void) perform { 
    UIViewController *src = (UIViewController *) self.sourceViewController; 
    UIViewController *dst = (UIViewController *) self.destinationViewController; 
    [UIView transitionWithView:src.navigationController.view duration:0.3 
         options:UIViewAnimationOptionTransitionFlipFromBottom 
        animations:^{ 
         [src.navigationController pushViewController:dst animated:NO]; 
        } 
        completion:NULL]; 
}