From 711693f09a37285f54d377df908c6059b2c08d36 Mon Sep 17 00:00:00 2001 From: fish Date: Mon, 20 Jul 2026 21:49:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A1=AE=E8=AE=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=AD=A3=E5=B8=B8=E6=A8=A1=E5=BC=8F=E4=B8=8B=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E8=A7=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../LearnEnglish/Views/SpellingInputView.swift | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift b/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift index 2c9b975..6113f86 100644 --- a/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift +++ b/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift @@ -71,7 +71,7 @@ final class SpellingInputView: UIView, UITextFieldDelegate { let bgImage = renderer.image { ctx in let gradient = CGGradient( colorsSpace: CGColorSpaceCreateDeviceRGB(), - colors: [UIColor(white: 1, alpha: 0.65).cgColor, UIColor(white: 1, alpha: 0.2).cgColor] as CFArray, + colors: [UIColor(red: 0.6, green: 0.75, blue: 0.95, alpha: 0.7).cgColor, UIColor(red: 0.3, green: 0.55, blue: 0.85, alpha: 0.45).cgColor] as CFArray, locations: [0, 0.5] )! ctx.cgContext.drawLinearGradient(gradient, @@ -79,15 +79,9 @@ final class SpellingInputView: UIView, UITextFieldDelegate { } glassButton.setBackgroundImage(bgImage, for: .normal) - var titleConfig = UIButton.Configuration.plain() - titleConfig.title = "确认" - titleConfig.baseForegroundColor = .white - titleConfig.titleTextAttributesTransformer = UIConfigurationTextAttributesTransformer { incoming in - var outgoing = incoming - outgoing.font = .systemFont(ofSize: 16, weight: .semibold) - return outgoing - } - glassButton.configuration = titleConfig + glassButton.setTitle("确认", for: .normal) + glassButton.setTitleColor(.white, for: .normal) + glassButton.titleLabel?.font = .systemFont(ofSize: 16, weight: .semibold) glassButton.addAction(UIAction { [weak self] _ in self?.onSubmit?() }, for: .touchUpInside)