我有两个UIViewController是StoryBoards。我们说他们是FirstVC
和SecondVC
。从FirstVC
开始,我想使用以下代码显示SecondVC
。
UIViewController *secondVC;
secondVC = [self.storyboard instantiateViewControllerWithIdentifier:@"secondVC"];
[self.firstVC presentViewController: secondVC animated:YES completion:nil];
现在在StoryBoard中,我在NavigationController中嵌入了secondVC
,但是,在显示时,secondVC
缺少NavigationBar。
firstVC
和secondVC
未通过StoryBoard连接,因为我想向他们展示代码。
我错过了什么或者我做错了吗?