4 つのタブと 1 つにフックされたナビゲーション バーを備えたタブバー アプリケーションがあります。ナビゲーション バーのあるタブには、新しいページに移動するためのボタンがあります。タブページに戻るものもありますが、問題があります。タブページに戻ると、アニメーションがうまくいきません。これはすべてストーリーボードで行ったので、コーディングはありません。私は周りを見回して、これをコードに入れたい:
- (void) pushController: (UIViewController*) controller
withTransition: (UIViewAnimationTransition) transition
{
[UIView beginAnimations:nil context:NULL];
[self pushViewController:controller animated:NO];
[UIView setAnimationDuration:.5];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationTransition:transition forView:self.view cache:YES];
[UIView commitAnimations];
}
しかし、私はそれをどこにどのように置くべきかわかりません。