我无法在不丢失tabBarController的情况下从一个页面切换到另一个页面
我使用didSelectRow,除了不显示视图的tabBar菜单外,我还可以恢复数据和更改页面
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let storagepasse: String
tableView.deselectRow(at: indexPath as IndexPath, animated: true)
storagepasse = storages[indexPath.row].id!
print(storagepasse)
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let secondView = storyboard.instantiateViewController(withIdentifier: "GestionStorage") as! InformationStorageController
secondView.infoStorage = storagepasse
self.present(secondView, animated: true,completion: nil)
}发布于 2019-04-03 04:18:25
检查vc(secondView)中的modalPresentationStyle属性。你需要像.currentContext或.overCurrentContext这样的东西。
发布于 2019-04-03 05:03:03
使用推视图控制器,而不是呈现它。
self.navigationController?.pushViewController(secondView, animated: true)您还可以添加此内容。
self.navigationController?.tabBarController?.hidesBottomBarWhenPushed = falsehttps://stackoverflow.com/questions/55482754
复制相似问题