【发布时间】:2017-01-27 19:13:24
【问题描述】:
我的 TableViewController 中嵌入了 NavigationController。当我运行应用程序时,一切正常,但导航栏不显示。
这就是我的代码的样子:
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let box = boxes[indexPath.row]
print(box.name)
if let storyboard = self.storyboard {
let viewController = storyboard.instantiateViewController(withIdentifier: "BoxDescriptionTVC") as! BoxDescriptionTableViewController
self.present(viewController, animated: false, completion: nil)
viewController.boxDetailsLabel.text = box.boxDescription
if let boxImageURL = box.boxImageURL {
viewController.boxImageView.loadImageUsingCacheWithUrlString(urlString: boxImageURL)
}
}
}
如何创建我的 NavigationController 的实例来展示它而不是 TableViewController?
【问题讨论】:
-
您应该创建导航控制器的实例并显示它而不是 BoxDescriptionTVC。
-
如何创建我的 NavigationController 的实例来展示它而不是 TableViewController?
标签: swift uitableview uinavigationcontroller ios10 xcode8