LoginSignup
0
1

【Swift】モーダル画面の下スワイプで画面を閉じる機能を無効にする方法

Last updated at Posted at 2023-10-04

はじめに

Modal画面を表示して、下スワイプで画面を閉じると、色々と都合が悪かったので、下スワイプで画面を閉じる機能を無効にしました。
忘れないために、備忘録を残します。

実装方法

class ModalViewController {
    override func viewDidLoad() {
        super.viewDidLoad()

        // ここを追記する
        self.isModalInPresentation = true
    }
}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1