确认按钮仅在学习模式显示

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 22:06:13 +08:00
parent e890350f9a
commit 486fda8fc6
2 changed files with 6 additions and 0 deletions
@@ -227,6 +227,7 @@ final class QuizViewController: UIViewController {
} }
spellingView.confirmButton?.isEnabled = false spellingView.confirmButton?.isEnabled = false
} else { } else {
spellingView.hideAccessoryView()
spellingView.onChange = { [weak self] in spellingView.onChange = { [weak self] in
guard let self else { return } guard let self else { return }
nextButton.isEnabled = spellingView.isComplete nextButton.isEnabled = spellingView.isComplete
@@ -127,6 +127,11 @@ final class SpellingInputView: UIView, UITextFieldDelegate {
refreshBoxes() refreshBoxes()
} }
func hideAccessoryView() {
confirmButton?.isHidden = true
hiddenField.inputAccessoryView = nil
}
func showResultState(correct: Bool) { func showResultState(correct: Bool) {
let color = correct ? Theme.Color.correct : Theme.Color.wrong let color = correct ? Theme.Color.correct : Theme.Color.wrong
for position in blankPositions { for position in blankPositions {