From 9ce69f3ddbec0675caf54293da3d14169953b4c2 Mon Sep 17 00:00:00 2001 From: wangdl Date: Sat, 30 May 2026 09:14:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(ios):=20=E5=AD=A6=E4=B9=A0=20Tab=20?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=8F=8C=E8=89=B2=E6=96=B9=E6=A1=88=EF=BC=88?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=BB=91+=E7=81=B0=20/=20=E6=BF=80=E6=B4=BB?= =?UTF-8?q?=E8=93=9D+=E6=B5=85=E8=93=9D=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tab-learn.svg: 默认态(黑色主路径 + 灰色次路径) - tab-learn-active.svg: 激活态(#3D7FFB + #9DA7FD 品牌色) - ContentView 根据 selectedTab 自动切换图标 Co-Authored-By: Claude Opus 4.7 --- .../Icons/tab-learn-active.imageset/Contents.json | 10 ++++++++++ .../tab-learn-active.imageset/tab-learn-active.svg | 1 + .../Icons/tab-learn-active.imageset/tab-learn.svg | 1 + .../Icons/tab-learn.imageset/tab-learn.svg | 2 +- AIStudyApp/AIStudyApp/ContentView.swift | 2 +- 5 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/Contents.json create mode 100644 AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/tab-learn-active.svg create mode 100644 AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/tab-learn.svg diff --git a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/Contents.json b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/Contents.json new file mode 100644 index 0000000..66f536e --- /dev/null +++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/Contents.json @@ -0,0 +1,10 @@ +{ + "images" : [ + { + "filename" : "tab-learn-active.svg", + "idiom" : "universal" + } + ], + "info" : { "author" : "xcode", "version" : 1 }, + "properties" : { "preserves-vector-representation" : true } +} diff --git a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/tab-learn-active.svg b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/tab-learn-active.svg new file mode 100644 index 0000000..1ea99cf --- /dev/null +++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/tab-learn-active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/tab-learn.svg b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/tab-learn.svg new file mode 100644 index 0000000..be50f58 --- /dev/null +++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn-active.imageset/tab-learn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn.imageset/tab-learn.svg b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn.imageset/tab-learn.svg index be50f58..d430c3b 100644 --- a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn.imageset/tab-learn.svg +++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/tab-learn.imageset/tab-learn.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/AIStudyApp/AIStudyApp/ContentView.swift b/AIStudyApp/AIStudyApp/ContentView.swift index 1bd241e..6ed2d84 100644 --- a/AIStudyApp/AIStudyApp/ContentView.swift +++ b/AIStudyApp/AIStudyApp/ContentView.swift @@ -51,7 +51,7 @@ struct ContentView: View { .background(Color.zxCanvas.ignoresSafeArea()) } .tabItem { - Label("学习", image: "tab-learn") + Label("学习", image: selectedTab == "study" ? "tab-learn-active" : "tab-learn") } .tag("study")