【发布时间】:2018-07-10 00:09:01
【问题描述】:
当函数执行完毕后,我想回到我的 ProfileTabViewController。我想被发送回视图控制器,保持 ProfileTabViewControllers 与以前相同的导航栏和 UITabBarController。我现在拥有它的方式将它发送到 ProfileTavViewController 但我丢失了导航栏和标签栏。如何将其发送回原始 ProfileTabViewController。第一个图像是原始的 ViewController,第二个图像是它被发送回来的时候。
@IBAction func updateAction(_ sender: Any) {
let newInterests = options.joined(separator: " , ")
if newInterests == ""{
showAlert(message: "Please select at least one interest.")
}else{
updateFunction()
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "ProfileTabViewController") as! UIViewController
self.navigationController?.present(vc, animated: true, completion: nil)
}
}
【问题讨论】:
-
返回时如何关闭视图控制器?
标签: ios swift uinavigationcontroller uistoryboard