-1
當我點擊表格視圖單元格時,當我關閉模式並切換到另一個選項卡,並返回到第一個選項卡時,我看到一個黑色屏幕,出現一個模式。如果我點擊另一個標籤而沒有點擊一個單元格,並返回到最初的標籤黑色屏幕不顯示。我假設錯誤發生在我如何呈現它或我如何刪除模態視圖。切換選項卡後出現黑屏
self.parentNavigationController?.addChildViewController(modal)
self.parentNavigationController?.view.window?.addSubview(modal.view)
modal.didMove(toParentViewController: self.parentNavigationController)
要刪除模式我只是簡單地做self.view.removeFromSuperview()