last controller's content visible while pushin

2019-08-20 05:33发布

问题:

I am facing a very basic problem while pushing a view controller. When I am pushing a new controller, the last controller's content is visible on screen. I am pushing the new controller as follows:

DispatchQueue.main.async {
                    self.navigationController?.pushViewController(reviewFeatureViewController, animated: true)
                }

回答1:

I had that too occasionally. What helped for me was making sure the backgroundColor is not .clear try this:

viewController.backgroundColor = .white