問題
iOS13で、presentで画面遷移をした際、全画面表示されなくなっている。
そして、画面を下にスワイプすると、簡単に遷移前の画面に戻れてしまう。
原因
iOS13ではpresentでモーダル表示する際のmodalPresentationStyleのデフォルト値が.pageSheetに変更されたため。
解決法
遷移先のViewControllerのmodalPresentationStyleに.fullScreenを設定すればOK。
ViewController.swift
let loginStoryBoard: UIStoryboard = UIStoryboard(name: "Login", bundle: nil)
let viewController = loginStoryBoard.instantiateInitialViewController()
viewController?.modalPresentationStyle = .fullScreen
self.present(viewController!, animated: true, completion: nil)
すると、以下のように全画面表示され、スワイプしても遷移前の画面に戻れなくなります。
参考
iOS - ios13のプロジェクトでpresentすると遷移前の画面に戻れてしまう|teratail
viewcontroller - Presenting modal in iOS 13 fullscreen - Stack Overflow