From 28b61d20f13e7305e12feece600e9078a852ae3f Mon Sep 17 00:00:00 2001 From: fish Date: Mon, 20 Jul 2026 21:58:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=A1=AE=E8=AE=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=B0=BA=E5=AF=B8=E3=80=81=E5=9C=86=E8=A7=92=E3=80=81?= =?UTF-8?q?=E9=94=AE=E7=9B=98=E9=97=B4=E8=B7=9D=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=A8=AA=E7=AB=96=E5=B1=8F=E9=80=82=E9=85=8D?= 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 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift b/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift index 872b5ee..44a64b1 100644 --- a/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift +++ b/LearnEnglish/LearnEnglish/Views/SpellingInputView.swift @@ -58,12 +58,14 @@ final class SpellingInputView: UIView, UITextFieldDelegate { addSubview(hiddenField) let accessory = UIView() - accessory.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 52) + accessory.frame = CGRect(x: 0, y: 0, width: 0, height: 74) + accessory.autoresizingMask = .flexibleWidth accessory.backgroundColor = .clear var glassConfig = UIButton.Configuration.glass() glassConfig.title = "确认" glassConfig.cornerStyle = .fixed + glassConfig.background.cornerRadius = 25 glassConfig.baseForegroundColor = .label glassConfig.titleTextAttributesTransformer = UIConfigurationTextAttributesTransformer { incoming in var outgoing = incoming @@ -78,9 +80,9 @@ final class SpellingInputView: UIView, UITextFieldDelegate { accessory.addSubview(glassButton) NSLayoutConstraint.activate([ glassButton.trailingAnchor.constraint(equalTo: accessory.trailingAnchor, constant: -15), - glassButton.centerYAnchor.constraint(equalTo: accessory.centerYAnchor), - glassButton.widthAnchor.constraint(equalToConstant: 60), - glassButton.heightAnchor.constraint(equalToConstant: 44) + glassButton.topAnchor.constraint(equalTo: accessory.topAnchor, constant: 12), + glassButton.widthAnchor.constraint(equalToConstant: 80), + glassButton.heightAnchor.constraint(equalToConstant: 50) ]) hiddenField.inputAccessoryView = accessory