@@ -359,7 +359,11 @@ final class QuizViewController: UIViewController {
|
|||||||
wrongWords.append(question.word)
|
wrongWords.append(question.word)
|
||||||
}
|
}
|
||||||
correct ? Haptics.correct() : Haptics.wrong()
|
correct ? Haptics.correct() : Haptics.wrong()
|
||||||
|
if config.isStudyMode {
|
||||||
|
spellingView.freezeInput()
|
||||||
|
} else {
|
||||||
spellingView.deactivate()
|
spellingView.deactivate()
|
||||||
|
}
|
||||||
spellingView.showResultState(correct: correct)
|
spellingView.showResultState(correct: correct)
|
||||||
showResult(correct, for: question)
|
showResult(correct, for: question)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,6 +122,11 @@ final class SpellingInputView: UIView, UITextFieldDelegate {
|
|||||||
refreshBoxes()
|
refreshBoxes()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func freezeInput() {
|
||||||
|
inputEnabled = false
|
||||||
|
refreshBoxes()
|
||||||
|
}
|
||||||
|
|
||||||
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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user