我有3個ViewControllers,並希望導航之間,然後不出現第二個。UIViewControllers之間的導航Swift 2.2
我想要做這樣的事情究竟是什麼:
FirstController
覆蓋FUNC viewDidLoad中(){
super.viewDidLoad()
let secondController = SecondController();
secondController.showThird();
}
SecondController
倍率FUNC viewDidLoad中(){
super.viewDidLoad()
super.didReceiveMemoryWarning()
} FUNC showThird(){
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let controller = storyboard.instantiateViewControllerWithIdentifier("thirdId")
self.navigationController?.pushViewController(controller, animated: true)
}
ThirdController
倍率FUNC viewDidLoad中(){
super.viewDidLoad()
}
爲什麼你在didReceiveMemoryWarning()中編寫代碼? –
哦對不起,我會更新它 –