Why current ViewController is changed when navigating to another ViewController in iOS with swift

Viewed 43

I am trying to navigate from one screen to another and want to show current screen in the background by setting Alpha value of the target screen, but when I am landing to the target screen background ViewController is not the same from where I landed. I am using below code to navigate

let visitorModalVc = UIStoryboard(name: "VisitorInfo", bundle: nil).instantiateViewController(withIdentifier: "visitor_modal_vc") as! VisitorInfoModalViewController
visitorModalVc.modalPresentationStyle = .fullScreen


self.present(visitorModalVc, animated: false, completion: nil)

It is working fine when I am using visitorModalVc.modalPresentationStyle = .popover but .popover is crashing in tab

0 Answers
Related