我试图在单击表格 View 单元格中的按钮后呈现一个新 View 。 View 可以显示但没有标签栏。有没有用标签栏显示 View 的解决方案?谢谢。
使用 segue 或程序化是不正确的。
func viewDetailAction(sender: UIButton){
let vc = self.storyboard?.instantiateViewControllerWithIdentifier("patientDetailVC ") as! PatientDetailViewController
// self.presentViewController(vc, animated: true, completion: nil)
// self.navigationController?.pushViewController(vc, animated: true)
self.performSegueWithIdentifier("patientDetailCell", sender: self)
}
最佳答案
更简单的方法是自己展示 VC
self.presentViewController(vc, animated:true, completion:nil)
这将在您当前的 VC 上显示它,而不是在选项卡 barController 上显示它,因为它可能在 Storyboard segue 中完成
请忽略任何代码语法错误。
关于Swift,呈现一个带有标签栏的新 uiview,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37005286/