flyingbirdのiPhoneアプリ開発記録

- PolyRhythmの中の人がiPhoneアプリ開発中に思ったことを記録するブログです -

Segue

Segueで画面の遷移のstyleをcustomにした際に、遷移時のアニメーションを実装するクラスを作らなくては行けないらしい・・・事はググったらわかった。
UIStoryboardSegueを継承したクラスを作り、以下のようにメソッドを実装する。

- (void)perform {
    UIViewController *sourceViewController = (UIViewController *)self.sourceViewController;
    UIViewController *destinationViewController = (UIViewController *)self.destinationViewController;
    [UIView transitionWithView:sourceViewController.navigationController.view
                      duration:1.5f
                       options:UIViewAnimationOptionTransitionCrossDissolve
                    animations:^{
                        [sourceViewController.navigationController pushViewController:destinationViewController animated:NO];
                    }
                    completion:nil];
}
}

アニメーションのオプションはいくつか用意されているみたいだが、それ以外にカスタマイズしたい場合はどうしたら良いんだろうか。