I have a situation where I have three viewcontroller let suppose VC1, VC2 and VC3, and I presented VC2 on VC1 modally with navigation controller like
let nav = UINavigationController(rootViewController: VC2)
self.present(nav, animation:true)
What I want push VC3 overfullscreen from VC2 without changing the Presentation style of VC2 in iOS 13+. currently its overCurrentContext.
If you are adding the view controller VC3 as the root view controller of a navigation controller, then you need to modalPresentationStyle as overFullScreen to the navigation controller.
let nav = UINavigationController(rootViewController: VC3)
nav.modalPresentationStyle = .overFullScreen
self.present(nav, animation: true)
If you are directly presenting VC3, then do it like this.
VC3.modalPresentationStyle = .overFullScreen
self.present(VC3, animation: true)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With