带故事板的导航控制器,iOS

时间:2015-06-09 19:50:50

标签: ios objective-c

我有两个UIViewController是StoryBoards。我们说他们是FirstVCSecondVC。从FirstVC开始,我想使用以下代码显示SecondVC

UIViewController *secondVC;
secondVC = [self.storyboard instantiateViewControllerWithIdentifier:@"secondVC"];
[self.firstVC presentViewController: secondVC animated:YES completion:nil];

现在在StoryBoard中,我在NavigationController中嵌入了secondVC,但是,在显示时,secondVC缺少NavigationBar。

firstVCsecondVC未通过StoryBoard连接,因为我想向他们展示代码。

我错过了什么或者我做错了吗?

0 个答案:

没有答案