2016-05-06 116 views
0

我尝试使用导航显示导航,但过渡动画是从下往上。在iOS中,导航显示导航

UIViewController2 * vc2 = [[UIViewController2 alloc] init]; 
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:vc2]; 
[self.navigationController showViewController:nav sender:nil]; 
+0

为什么你需要做的是什么?这很奇怪。 –

+0

@JLT因为在scrolla显示导航栏时,vc2中没有导航栏。 – AhnQiraj

+0

嗯,也许我只是不明白我猜的流量。 –

回答

0

试试。

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle: nil]; 
SecondViewController * vc = [storyboard instantiateViewControllerWithIdentifier:@"ViewControllerB"]; 
[[self navigationController] pushViewController:vc animated:YES];