【发布时间】:2017-11-28 02:52:41
【问题描述】:
我在 Storyboard 中有一个 ViewController(没有标签栏和导航栏),我需要移动到另一个 ViewController(有标签栏和导航栏)。问题是我可以移动到 ViewController 但它不会显示标签栏和导航栏。
我是这样做的:
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let feedTableViewController = storyboard.instantiateViewController(withIdentifier: "Feed") as! FeedTableViewController
self.navigationController?.pushViewController(feedTableViewController, animated: true)
我尝试将 Navigation Bar 和 Tab Bar 嵌入到第一个 ViewController 但我没有运气。这样做的正确方法是什么?
【问题讨论】:
-
将导航控制器添加到第一个视图控制器。
-
@KKRocks 我试过了,就像我在问题中提到的那样。
标签: ios iphone swift uiviewcontroller storyboard