Search code examples
iosswiftxcode11

How To Remove The First ViewController In The Background?


I have two view controllers, first view controller and the second view controller, when the user segue from the first view controller to the second view controller, the first view controller still visible and sits behind the second view controller. The user can swipe the first view controller and see the entire first view controller and then they got stuck there. I noticed that this only happens after the launch of iOS 13.

performSegue(withIdentifier: "showSecond", sender: self)

enter image description here


Solution

  • Follow these two steps:

    1. Click on the segue you created on the Storyboard
    2. Go to Attributes Inspector
    3. Set the Presentation to "Full Screen"

    enter image description here