【发布时间】:2014-12-31 18:42:32
【问题描述】:
我是 swift 和 IOS 开发的新手。我正在开发一个选项卡式应用程序(3 个视图)。例如,FirstView、SecondView 和 ThirdView。 FirstView 有一个打开 addNewSession 视图的按钮,而 addNewSession 视图有一个返回 FirstView 的返回按钮。问题是从 addNewSession 视图返回后标签栏消失了
FirstView 到 addNewSession 视图。
@IBAction func toAddNew(sender: AnyObject) {
let addNewSession = self.storyboard?.instantiateViewControllerWithIdentifier("addNewSession") as addNew
self.presentViewController(addNewSession, animated: true, completion: nil)
}
将NewSession 视图添加到FirstView
@IBAction func backToPrev(sender: AnyObject) {
println("test1")
let FirstView = self.storyboard?.instantiateViewControllerWithIdentifier("FirstView") as FirstViewController
self.presentViewController(FirstView, animated: true, completion: nil)
}
【问题讨论】: