From 4e33ec4ecb059ab45af283a7f8f86a103fe11d38 Mon Sep 17 00:00:00 2001 From: dongjf <1+dongjf@noreply.git.tutudog.com> Date: Thu, 26 Nov 2026 15:43:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(ios):=20=E8=B0=83=E6=95=B4=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=A0=87=E9=A2=98=E5=92=8C=E5=85=A5=E5=8F=A3=E7=9A=84?= =?UTF-8?q?=E7=95=99=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ios/ItemAtlas/WelcomeView.swift | 81 ++++++++++++++-------------- docs/ui/ios-welcome.md | 2 +- 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/apps/ios/ItemAtlas/WelcomeView.swift b/apps/ios/ItemAtlas/WelcomeView.swift index 997719c..c6b9d92 100644 --- a/apps/ios/ItemAtlas/WelcomeView.swift +++ b/apps/ios/ItemAtlas/WelcomeView.swift @@ -26,46 +26,45 @@ struct WelcomeView: View { @ScaledMetric(relativeTo: .largeTitle) private var headlineSize = 41.0 var body: some View { - ScrollView { - VStack(alignment: .leading, spacing: 19) { - EntryBrand() - if dynamicType.isAccessibilitySize { headline } - scene - Text("说一句「数据线放在书房抽屉」,见物帮你记下。") - .font(.body) - .foregroundStyle(.primary.opacity(0.77)) - .lineSpacing(4) - } - .frame(maxWidth: 460, alignment: .leading) - .padding(.horizontal, 23) - .padding(.vertical, 12) - .frame(maxWidth: .infinity) - } - .safeAreaInset(edge: .bottom, spacing: 0) { - NavigationLink { - SignInView(account: account) - } label: { - HStack(spacing: 9) { - Text("进入我的空间") - Image(systemName: "arrow.right").accessibilityHidden(true) + GeometryReader { viewport in + ScrollView { + VStack(alignment: .leading, spacing: 19) { + EntryBrand() + if dynamicType.isAccessibilitySize { headline } + scene + Text("说一句「数据线放在书房抽屉」,见物帮你记下。") + .font(.body) + .foregroundStyle(.primary.opacity(0.77)) + .lineSpacing(4) + signInLink + .padding(.top, 4) } - .font(.body.weight(.semibold)) - .frame(maxWidth: .infinity, minHeight: 29) + .frame(maxWidth: 460, alignment: .leading) + .padding(.horizontal, 23) + .padding(.vertical, 16) + .frame(maxWidth: .infinity, minHeight: viewport.size.height) } - .buttonStyle(.borderedProminent) - .buttonBorderShape(.roundedRectangle(radius: 15)) - .controlSize(.large) - .frame(maxWidth: 460) - .padding(.horizontal, 23) - .padding(.vertical, 12) - .frame(maxWidth: .infinity) - .foregroundStyle(.white) - .background(Color.entryBackground(for: colorScheme)) } .background(Color.entryBackground(for: colorScheme).ignoresSafeArea()) .toolbar(.hidden, for: .navigationBar) } + private var signInLink: some View { + NavigationLink { + SignInView(account: account) + } label: { + HStack(spacing: 9) { + Text("进入我的空间") + Image(systemName: "arrow.right").accessibilityHidden(true) + } + .font(.body.weight(.semibold)) + .frame(maxWidth: .infinity, minHeight: 29) + } + .buttonStyle(.borderedProminent) + .buttonBorderShape(.roundedRectangle(radius: 15)) + .controlSize(.large) + } + private var headline: some View { Text("家里有的,\n心里有数。") .font(.system(size: headlineSize, weight: .semibold)) @@ -74,7 +73,7 @@ struct WelcomeView: View { private var scene: some View { Color.atlasNavy - .aspectRatio(0.94, contentMode: .fit) + .aspectRatio(0.86, contentMode: .fit) .overlay { GeometryReader { proxy in Image("WelcomeTray") @@ -86,12 +85,14 @@ struct WelcomeView: View { } .overlay(alignment: .topLeading) { if !dynamicType.isAccessibilitySize { - LinearGradient(colors: [.black.opacity(0.42), .clear], startPoint: .top, endPoint: .center) - .accessibilityHidden(true) - headline - .foregroundStyle(.white) - .padding(.horizontal, 23) - .padding(.top, 23) + ZStack(alignment: .topLeading) { + LinearGradient(colors: [.black.opacity(0.36), .clear], startPoint: .top, endPoint: .center) + .accessibilityHidden(true) + headline + .foregroundStyle(.white) + .padding(.horizontal, 23) + .padding(.top, 23) + } } } .clipShape(.rect(cornerRadius: 25)) diff --git a/docs/ui/ios-welcome.md b/docs/ui/ios-welcome.md index c0e5560..180185c 100644 --- a/docs/ui/ios-welcome.md +++ b/docs/ui/ios-welcome.md @@ -18,7 +18,7 @@ ## 首次打开 -首页上方是见物标识。光线偏暖的玄关照片占主要空间,标题放在照片留出的深色区域。照片下方用一句实际的录入场景说明用途。底部保留单个主入口。 [首页主图](../../apps/ios/ItemAtlas/Assets.xcassets/WelcomeTray.imageset/WelcomeTray.jpg) +首页上方是见物标识。光线偏暖的玄关照片占主要空间,标题放在照片留出的深色区域。照片下方用一句实际的录入场景说明用途。说明下方保留单个主入口。 [首页主图](../../apps/ios/ItemAtlas/Assets.xcassets/WelcomeTray.imageset/WelcomeTray.jpg) ```text 见物