サブクラスUINavigationController化してオーバーライドしますpushViewController:animated:。
すぐにスーパーを呼び出さないで、次のようなアニメーションをカスタマイズしますか?
nextViewController.view.transform = CGAffineTransformMakeTranslation(0, -nextViewController.view.frame.size.height);
void(^animationBlock)(void) = ^{
[super pushViewController:nextViewController animated:NO];
nextViewController.view.transform = CGAffineTransformIdentity;
};
if (animated) {
[UIView animateWithDuration:0.3f animations:animationBlock];
}
else{
animationBlock();
}
アップデート:
実際にはサブクラス化する必要はありませんUINavigationController。VC を通常の にプッシュするたびに、上記のアニメーションを実行することもできますUINavigationController。