Reputation: 916
When im present new VC background is clear and I can see previous VC.
Second VC is empty (without any view)
How FIX?
let vc = AddScrollVC()
let navController = UINavigationController(rootViewController: vc)
navController.modalPresentationStyle = .overFullScreen
present(navController, animated: true)
Second VC is presented, shown only button in navBar
Upvotes: 0
Views: 89
Reputation: 508
Change the code like this, This is work fine for me
let VC = PresentVC()
VC.modalPresentationStyle = .overFullScreen
self.present(VC, animated: true, completion: nil)
Upvotes: 0
Reputation: 508
You can solve the issue with replacing this code
let VC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "PresentVC") as! PresentVC
VC.modalPresentationStyle = .overFullScreen
self.present(VC, animated: true, completion: nil)
Upvotes: 0