【发布时间】:2019-05-26 07:21:00
【问题描述】:
我有具有后视图和前视图的 Reveal View 控制器,后视图是我的侧边菜单,问题是当我从侧边菜单中点击菜单项时,它显示目标视图控制器但导航栏未显示。请帮我。我是iOS新手。 这是我的故事板图片: https://imgur.com/a/PbDygKO
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
itemIndex = indexPath.row
self.revealViewController().revealToggle(animated: true)
performSegue(withIdentifier: "webview", sender: nil)
}
这里是准备功能
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
guard let navigationController = segue.destination as? UINavigationController, let progressWebViewController = navigationController.topViewController as? ProgressWebViewController else {
return
}
switch itemIndex {
case 1:
let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let newViewController = storyBoard.instantiateViewController(withIdentifier: "aboutus") as! AboutUsController
self.present(newViewController, animated: true, completion: nil)
break
case 2:
loadURL(progressWebViewController: progressWebViewController ,url: "https://google.com", title: "Event Planning")
case 3:
loadURL(progressWebViewController: progressWebViewController ,url: "https://google.com", title: "NCC Checklist")
default:
print("Unknown segue \(itemIndex)")
}
}
【问题讨论】:
标签: ios swift navigationbar