From 0f55f76caaa837f88c92e1de9c6c757669d4fce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Mon, 15 Jun 2020 19:45:00 +0200 Subject: [PATCH] Demo app tweaks --- .../GRDBDemoiOS/GRDBDemoiOS/Base.lproj/Main.storyboard | 4 ++++ .../GRDBDemoiOS/PlayerEditionViewController.swift | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/Base.lproj/Main.storyboard b/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/Base.lproj/Main.storyboard index 04f234225..8d863c1f6 100644 --- a/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/Base.lproj/Main.storyboard +++ b/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/Base.lproj/Main.storyboard @@ -28,6 +28,7 @@ + @@ -54,6 +55,9 @@ + + + diff --git a/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/PlayerEditionViewController.swift b/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/PlayerEditionViewController.swift index a4c2de6d9..9c1b15ffd 100644 --- a/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/PlayerEditionViewController.swift +++ b/Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS/PlayerEditionViewController.swift @@ -102,6 +102,13 @@ extension PlayerEditionViewController: UITextFieldDelegate { return false } + @IBAction func textFieldDidChange(_ textField: UITextField) { + // User has edited the player: prevent interactive dismissal + if case .modal = presentation { + isModalInPresentation = true + } + } + private func configureForm() { guard isViewLoaded else { return }