From 794608d69ccbc294f6697c779207196990f124d5 Mon Sep 17 00:00:00 2001 From: fish Date: Mon, 20 Jul 2026 22:01:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E6=A8=A1=E5=BC=8F=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E5=90=8E=E4=BF=9D=E6=8C=81=E9=94=AE=E7=9B=98=E4=B8=8D?= =?UTF-8?q?=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- LearnEnglish/LearnEnglish/Views/QuizViewController.swift | 6 +++++- LearnEnglish/LearnEnglish/Views/SpellingInputView.swift | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/LearnEnglish/LearnEnglish/Views/QuizViewController.swift b/LearnEnglish/LearnEnglish/Views/QuizViewController.swift index 4b06f4e..cdc2a49 100644 --- a/LearnEnglish/LearnEnglish/Views/QuizViewController.swift +++ b/LearnEnglish/LearnEnglish/Views/QuizViewController.swift @@ -359,7 +359,11 @@ final class QuizViewController: UIViewController { wrongWords.append(question.word) } correct ? Haptics.correct() : Haptics.wrong() - spellingView.deactivate() + if config.isStudyMode { + spellingView.freezeInput() + } else { + spellingView.deactivate() + } spellingView.showResultState(correct: correct) showResult(correct, for: question) } diff --git a/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift b/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift index 6474088..8b0e28b 100644 --- a/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift +++ b/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift @@ -122,6 +122,11 @@ final class SpellingInputView: UIView, UITextFieldDelegate { refreshBoxes() } + func freezeInput() { + inputEnabled = false + refreshBoxes() + } + func showResultState(correct: Bool) { let color = correct ? Theme.Color.correct : Theme.Color.wrong for position in blankPositions {