-1

I have menu. I have to navigate from one viewController to another viewController. But destination viewController is open like pop up dialog.I don't know why it shows.I did not adjust. Here is the image enter image description here

Here is the code i have used for navigate one source viewController to destination viewController

       let mainstoryboard:UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
        let newViewcontroller = mainstoryboard.instantiateViewController(withIdentifier: "Search_Mobile_Number") as! Search_Mobile_Number
        let newFrontController = UINavigationController.init(rootViewController: newViewcontroller)
        self.present(newFrontController, animated: true, completion: nil)

Please help me why it is open like dialog.

Enamul Haque
  • 4,789
  • 1
  • 37
  • 50

2 Answers2

1

Change the modalPresentationStyle

let newFrontController = UINavigationController.init(rootViewController: newViewcontroller)
newFrontController.modalPresentationStyle = .fullScreen
self.present(newFrontController, animated: true, completion: nil)
0

In iOS 13 if you use present() method to show viewcontroller it’ll open like dialog only you can change fullScreen to overCurrentContext.. you can change in storyboard also.

Gowri G
  • 420
  • 4
  • 18