From 26af66efebc872120397f0087fbc09da139a4391 Mon Sep 17 00:00:00 2001 From: fish Date: Sun, 19 Jul 2026 00:17:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=80=E6=9C=89=E6=B5=8B=E8=AF=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=94=AF=E6=8C=81=E6=BB=91=E5=8A=A8=EF=BC=8C=E6=9A=97?= =?UTF-8?q?=E9=BB=91=E6=A8=A1=E5=BC=8F=E9=9F=B3=E6=A0=87=E6=9B=B4=E6=B8=85?= =?UTF-8?q?=E6=99=B0=EF=BC=8C=E7=BB=93=E6=9E=9C=E9=A1=B5=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=A0=8F=E6=92=AD=E6=94=BE=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LearnEnglish/LearnEnglish/SceneDelegate.swift | 1 + .../LearnEnglish/Views/QuizResultView.swift | 1 + .../Views/QuizSetupViewController.swift | 1 + .../Views/QuizViewController.swift | 22 ++++++++++++++----- .../LearnEnglish/Views/WordCardCell.swift | 2 +- .../Views/WordDetailViewController.swift | 1 + 6 files changed, 22 insertions(+), 6 deletions(-) diff --git a/LearnEnglish/LearnEnglish/SceneDelegate.swift b/LearnEnglish/LearnEnglish/SceneDelegate.swift index 18b2646..e239fa2 100644 --- a/LearnEnglish/LearnEnglish/SceneDelegate.swift +++ b/LearnEnglish/LearnEnglish/SceneDelegate.swift @@ -20,6 +20,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { navigation.navigationBar.prefersLargeTitles = true window.rootViewController = navigation window.makeKeyAndVisible() + window.backgroundColor = .systemBackground self.window = window } } diff --git a/LearnEnglish/LearnEnglish/Views/QuizResultView.swift b/LearnEnglish/LearnEnglish/Views/QuizResultView.swift index fb9f155..92de065 100644 --- a/LearnEnglish/LearnEnglish/Views/QuizResultView.swift +++ b/LearnEnglish/LearnEnglish/Views/QuizResultView.swift @@ -93,6 +93,7 @@ final class QuizResultView: UIView { private func buildLayout() { let scrollView = UIScrollView() + scrollView.alwaysBounceVertical = true addSubview(scrollView) scrollView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ diff --git a/LearnEnglish/LearnEnglish/Views/QuizSetupViewController.swift b/LearnEnglish/LearnEnglish/Views/QuizSetupViewController.swift index 0c4d723..3700d5f 100644 --- a/LearnEnglish/LearnEnglish/Views/QuizSetupViewController.swift +++ b/LearnEnglish/LearnEnglish/Views/QuizSetupViewController.swift @@ -52,6 +52,7 @@ final class QuizSetupViewController: UIViewController { contentStack.addArrangedSubview(countControl) let scrollView = UIScrollView() + scrollView.alwaysBounceVertical = true scrollView.addSubview(contentStack) contentStack.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ diff --git a/LearnEnglish/LearnEnglish/Views/QuizViewController.swift b/LearnEnglish/LearnEnglish/Views/QuizViewController.swift index c13b878..38efc93 100644 --- a/LearnEnglish/LearnEnglish/Views/QuizViewController.swift +++ b/LearnEnglish/LearnEnglish/Views/QuizViewController.swift @@ -140,13 +140,24 @@ final class QuizViewController: UIViewController { let mainStack = UIStackView(arrangedSubviews: [headerStack, promptStack, inputStack, resultStack, UIView()]) mainStack.axis = .vertical mainStack.spacing = 24 - view.addSubview(mainStack) + + let scrollView = UIScrollView() + scrollView.alwaysBounceVertical = true + view.addSubview(scrollView) + scrollView.addSubview(mainStack) + scrollView.translatesAutoresizingMaskIntoConstraints = false mainStack.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ - mainStack.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 16), - mainStack.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 16), - mainStack.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16), - mainStack.bottomAnchor.constraint(lessThanOrEqualTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -16) + scrollView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), + scrollView.leadingAnchor.constraint(equalTo: view.leadingAnchor), + scrollView.trailingAnchor.constraint(equalTo: view.trailingAnchor), + scrollView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor), + + mainStack.topAnchor.constraint(equalTo: scrollView.contentLayoutGuide.topAnchor, constant: 16), + mainStack.leadingAnchor.constraint(equalTo: scrollView.contentLayoutGuide.leadingAnchor, constant: 16), + mainStack.trailingAnchor.constraint(equalTo: scrollView.contentLayoutGuide.trailingAnchor, constant: -16), + mainStack.bottomAnchor.constraint(equalTo: scrollView.contentLayoutGuide.bottomAnchor, constant: -16), + mainStack.widthAnchor.constraint(equalTo: scrollView.frameLayoutGuide.widthAnchor, constant: -32), ]) } @@ -386,6 +397,7 @@ final class QuizViewController: UIViewController { } private func showQuizResult() { + navigationItem.rightBarButtonItem = nil progressView.setProgress(1, animated: true) let resultView = QuizResultView( total: questions.count, diff --git a/LearnEnglish/LearnEnglish/Views/WordCardCell.swift b/LearnEnglish/LearnEnglish/Views/WordCardCell.swift index 7610764..3fe5b0d 100644 --- a/LearnEnglish/LearnEnglish/Views/WordCardCell.swift +++ b/LearnEnglish/LearnEnglish/Views/WordCardCell.swift @@ -29,7 +29,7 @@ final class WordCardCell: UITableViewCell { wordLabel.font = .preferredFont(forTextStyle: .headline) phoneticLabel.font = .preferredFont(forTextStyle: .caption1) - phoneticLabel.textColor = .tertiaryLabel + phoneticLabel.textColor = .secondaryLabel meaningLabel.font = .preferredFont(forTextStyle: .subheadline) meaningLabel.textColor = .secondaryLabel diff --git a/LearnEnglish/LearnEnglish/Views/WordDetailViewController.swift b/LearnEnglish/LearnEnglish/Views/WordDetailViewController.swift index 1797b75..dfdf8fa 100644 --- a/LearnEnglish/LearnEnglish/Views/WordDetailViewController.swift +++ b/LearnEnglish/LearnEnglish/Views/WordDetailViewController.swift @@ -55,6 +55,7 @@ final class WordDetailViewController: UIViewController { private func buildLayout() { let scrollView = UIScrollView() + scrollView.alwaysBounceVertical = true view.addSubview(scrollView) scrollView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([