大小写切换改为仅刷新当前字母显示,不再重置整个页面
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -425,7 +425,15 @@ final class QuizViewController: UIViewController {
|
||||
isUppercase.toggle()
|
||||
UserDefaults.standard.set(isUppercase, forKey: "spelling_uppercase")
|
||||
updateCaseButton()
|
||||
restart()
|
||||
selectedOption = nil
|
||||
let words = config.words.map { word in
|
||||
let text = isUppercase ? word.word.uppercased() : word.word.lowercased()
|
||||
return Word(categoryId: word.categoryId, word: text, phonetic: word.phonetic,
|
||||
meaning: word.meaning, example: word.example, exampleMeaning: word.exampleMeaning)
|
||||
}
|
||||
questions = QuizGenerator.makeQuestions(mode: config.mode, words: words)
|
||||
showQuestion()
|
||||
spellingView.activate()
|
||||
}
|
||||
|
||||
private func updateCaseButton() {
|
||||
|
||||
Reference in New Issue
Block a user