feat(ios): 学习 Tab 图标双色方案(默认黑+灰 / 激活蓝+浅蓝)

- tab-learn.svg: 默认态(黑色主路径 + 灰色次路径)
- tab-learn-active.svg: 激活态(#3D7FFB + #9DA7FD 品牌色)
- ContentView 根据 selectedTab 自动切换图标

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
wangdl 2026-05-30 09:14:47 +08:00
parent e254db0ba4
commit 9ce69f3ddb
5 changed files with 14 additions and 2 deletions

View File

@ -0,0 +1,10 @@
{
"images" : [
{
"filename" : "tab-learn-active.svg",
"idiom" : "universal"
}
],
"info" : { "author" : "xcode", "version" : 1 },
"properties" : { "preserves-vector-representation" : true }
}

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M5.82979 4.30379C3.74578 4.12711 2.25 5.92291 2.25 7.83248L2.25 16.2865C2.25 17.8556 3.53746 19.0255 5.00318 19.13C7.16628 19.2842 9.04131 19.8403 10.733 20.9883C11.5288 21.5284 12.75 21.0288 12.75 19.944L12.75 7.94158C12.75 7.58997 12.6012 7.24565 12.3258 7.00597C10.4081 5.33741 8.2831 4.51178 5.82979 4.30379ZM3.75 7.83248C3.75 6.61426 4.67048 5.71089 5.70307 5.79843C7.82495 5.97832 9.61558 6.66822 11.25 8.05915L11.25 19.534C9.38484 18.3547 7.34843 17.7934 5.10985 17.6338C4.32785 17.578 3.75 16.9709 3.75 16.2865L3.75 7.83248Z" fill-rule="evenodd" fill="#3D7FFB" ></path><path d="M18.1702 4.30379C20.2542 4.12711 21.75 5.92291 21.75 7.83248L21.75 16.2865C21.75 17.8556 20.4625 19.0255 18.9968 19.13C16.8337 19.2842 14.9587 19.8403 13.267 20.9883C12.4712 21.5284 11.25 21.0288 11.25 19.944L11.25 7.94158C11.25 7.58997 11.3988 7.24565 11.6742 7.00597C13.5919 5.33741 15.7169 4.51178 18.1702 4.30379ZM20.25 7.83248C20.25 6.61426 19.3295 5.71089 18.2969 5.79843C16.1751 5.97832 14.3844 6.66822 12.75 8.05915L12.75 19.534C14.6152 18.3547 16.6516 17.7934 18.8901 17.6338C19.6721 17.578 20.25 16.9709 20.25 16.2865L20.25 7.83248Z" fill-rule="evenodd" fill="#3D7FFB" ></path><path d="M14.0735 14.1055C15.3886 13.1961 16.8675 12.9368 18.518 12.9762C18.9321 12.9861 19.2597 13.3298 19.2499 13.7439C19.24 14.158 18.8963 14.4857 18.4822 14.4758C17.0105 14.4407 15.8866 14.6755 14.9266 15.3393C14.5859 15.5749 14.1188 15.4897 13.8832 15.149C13.6476 14.8083 13.7328 14.3411 14.0735 14.1055Z" fill-rule="evenodd" fill="#9DA7FD" ></path><path d="M9.9265 14.1055C8.61139 13.1961 7.13249 12.9368 5.48204 12.9762C5.06794 12.9861 4.74026 13.3298 4.75015 13.7439C4.76003 14.158 5.10373 14.4857 5.51783 14.4758C6.98947 14.4407 8.11342 14.6755 9.07336 15.3393C9.41406 15.5749 9.88122 15.4897 10.1168 15.149C10.3524 14.8083 10.2672 14.3411 9.9265 14.1055Z" fill-rule="evenodd" fill="#9DA7FD" ></path><path d="M14.0735 10.0737C15.3886 9.16433 16.8675 8.90502 18.518 8.94441C18.9321 8.9543 19.2597 9.298 19.2499 9.71209C19.24 10.1262 18.8963 10.4539 18.4822 10.444C17.0105 10.4089 15.8866 10.6437 14.9266 11.3075C14.5859 11.5431 14.1188 11.4579 13.8832 11.1172C13.6476 10.7765 13.7328 10.3093 14.0735 10.0737Z" fill-rule="evenodd" fill="#9DA7FD" ></path><path d="M9.9265 10.0737C8.61139 9.16433 7.13249 8.90502 5.48204 8.94441C5.06794 8.9543 4.74026 9.298 4.75015 9.71209C4.76003 10.1262 5.10373 10.4539 5.51783 10.444C6.98947 10.4089 8.11342 10.6437 9.07336 11.3075C9.41406 11.5431 9.88122 11.4579 10.1168 11.1172C10.3524 10.7765 10.2672 10.3093 9.9265 10.0737Z" fill-rule="evenodd" fill="#9DA7FD" ></path></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M3.25 7.5C3.25 4.6005 5.60051 2.25 8.5 2.25L14.5 2.25C17.3995 2.25 19.75 4.6005 19.75 7.5L19.75 16.5C19.75 19.3995 17.3995 21.75 14.5 21.75L8.5 21.75C5.60051 21.75 3.25 19.3995 3.25 16.5L3.25 7.5ZM8.5 3.75C6.42893 3.75 4.75 5.42893 4.75 7.5L4.75 16.5C4.75 18.5711 6.42893 20.25 8.5 20.25L14.5 20.25C16.5711 20.25 18.25 18.5711 18.25 16.5L18.25 7.5C18.25 5.42893 16.5711 3.75 14.5 3.75L8.5 3.75Z" fill-rule="evenodd" fill="#000000" ></path><path d="M17.5 3.75L9 3.75L9 2.25L17.5 2.25C20.3995 2.25 22.75 4.6005 22.75 7.5L22.75 16.5C22.75 19.3995 20.3995 21.75 17.5 21.75L9 21.75L9 20.25L17.5 20.25C19.5711 20.25 21.25 18.5711 21.25 16.5L21.25 7.5C21.25 5.42893 19.5711 3.75 17.5 3.75Z" fill-rule="evenodd" fill="#000000" ></path><path d="M11.25 8C11.25 7.58579 11.5858 7.25 12 7.25L16 7.25C16.4142 7.25 16.75 7.58579 16.75 8C16.75 8.41421 16.4142 8.75 16 8.75L12 8.75C11.5858 8.75 11.25 8.41421 11.25 8Z" fill-rule="evenodd" fill="#000000" ></path><path d="M2.25 8C2.25 7.58579 2.58579 7.25 3 7.25L5 7.25C5.41421 7.25 5.75 7.58579 5.75 8C5.75 8.41421 5.41421 8.75 5 8.75L3 8.75C2.58579 8.75 2.25 8.41421 2.25 8Z" fill-rule="evenodd" fill="#000000" ></path><path d="M2.25 16C2.25 15.5858 2.58579 15.25 3 15.25L5 15.25C5.41421 15.25 5.75 15.5858 5.75 16C5.75 16.4142 5.41421 16.75 5 16.75L3 16.75C2.58579 16.75 2.25 16.4142 2.25 16Z" fill-rule="evenodd" fill="#000000" ></path><path d="M11.25 12C11.25 11.5858 11.5858 11.25 12 11.25L16 11.25C16.4142 11.25 16.75 11.5858 16.75 12C16.75 12.4142 16.4142 12.75 16 12.75L12 12.75C11.5858 12.75 11.25 12.4142 11.25 12Z" fill-rule="evenodd" fill="#000000" ></path><path d="M11.25 16C11.25 15.5858 11.5858 15.25 12 15.25L16 15.25C16.4142 15.25 16.75 15.5858 16.75 16C16.75 16.4142 16.4142 16.75 16 16.75L12 16.75C11.5858 16.75 11.25 16.4142 11.25 16Z" fill-rule="evenodd" fill="#000000" ></path><path d="M10 8C10 8.55228 9.55228 9 9 9C8.44771 9 8 8.55228 8 8C8 7.44772 8.44771 7 9 7C9.55228 7 10 7.44772 10 8Z" fill="#000000" ></path><path d="M10 12C10 12.5523 9.55228 13 9 13C8.44771 13 8 12.5523 8 12C8 11.4477 8.44771 11 9 11C9.55228 11 10 11.4477 10 12Z" fill="#000000" ></path><path d="M10 16C10 16.5523 9.55228 17 9 17C8.44771 17 8 16.5523 8 16C8 15.4477 8.44771 15 9 15C9.55228 15 10 15.4477 10 16Z" fill="#000000" ></path></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M3.25 7.5C3.25 4.6005 5.60051 2.25 8.5 2.25L14.5 2.25C17.3995 2.25 19.75 4.6005 19.75 7.5L19.75 16.5C19.75 19.3995 17.3995 21.75 14.5 21.75L8.5 21.75C5.60051 21.75 3.25 19.3995 3.25 16.5L3.25 7.5ZM8.5 3.75C6.42893 3.75 4.75 5.42893 4.75 7.5L4.75 16.5C4.75 18.5711 6.42893 20.25 8.5 20.25L14.5 20.25C16.5711 20.25 18.25 18.5711 18.25 16.5L18.25 7.5C18.25 5.42893 16.5711 3.75 14.5 3.75L8.5 3.75Z" fill-rule="evenodd" fill="#000000" ></path><path d="M17.5 3.75L9 3.75L9 2.25L17.5 2.25C20.3995 2.25 22.75 4.6005 22.75 7.5L22.75 16.5C22.75 19.3995 20.3995 21.75 17.5 21.75L9 21.75L9 20.25L17.5 20.25C19.5711 20.25 21.25 18.5711 21.25 16.5L21.25 7.5C21.25 5.42893 19.5711 3.75 17.5 3.75Z" fill-rule="evenodd" fill="#000000" ></path><path d="M11.25 8C11.25 7.58579 11.5858 7.25 12 7.25L16 7.25C16.4142 7.25 16.75 7.58579 16.75 8C16.75 8.41421 16.4142 8.75 16 8.75L12 8.75C11.5858 8.75 11.25 8.41421 11.25 8Z" fill-rule="evenodd" fill="#000000" ></path><path d="M2.25 8C2.25 7.58579 2.58579 7.25 3 7.25L5 7.25C5.41421 7.25 5.75 7.58579 5.75 8C5.75 8.41421 5.41421 8.75 5 8.75L3 8.75C2.58579 8.75 2.25 8.41421 2.25 8Z" fill-rule="evenodd" fill="#000000" ></path><path d="M2.25 16C2.25 15.5858 2.58579 15.25 3 15.25L5 15.25C5.41421 15.25 5.75 15.5858 5.75 16C5.75 16.4142 5.41421 16.75 5 16.75L3 16.75C2.58579 16.75 2.25 16.4142 2.25 16Z" fill-rule="evenodd" fill="#000000" ></path><path d="M11.25 12C11.25 11.5858 11.5858 11.25 12 11.25L16 11.25C16.4142 11.25 16.75 11.5858 16.75 12C16.75 12.4142 16.4142 12.75 16 12.75L12 12.75C11.5858 12.75 11.25 12.4142 11.25 12Z" fill-rule="evenodd" fill="#000000" ></path><path d="M11.25 16C11.25 15.5858 11.5858 15.25 12 15.25L16 15.25C16.4142 15.25 16.75 15.5858 16.75 16C16.75 16.4142 16.4142 16.75 16 16.75L12 16.75C11.5858 16.75 11.25 16.4142 11.25 16Z" fill-rule="evenodd" fill="#000000" ></path><path d="M10 8C10 8.55228 9.55228 9 9 9C8.44771 9 8 8.55228 8 8C8 7.44772 8.44771 7 9 7C9.55228 7 10 7.44772 10 8Z" fill="#000000" ></path><path d="M10 12C10 12.5523 9.55228 13 9 13C8.44771 13 8 12.5523 8 12C8 11.4477 8.44771 11 9 11C9.55228 11 10 11.4477 10 12Z" fill="#000000" ></path><path d="M10 16C10 16.5523 9.55228 17 9 17C8.44771 17 8 16.5523 8 16C8 15.4477 8.44771 15 9 15C9.55228 15 10 15.4477 10 16Z" fill="#000000" ></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M5.82979 4.30379C3.74578 4.12711 2.25 5.92291 2.25 7.83248L2.25 16.2865C2.25 17.8556 3.53746 19.0255 5.00318 19.13C7.16628 19.2842 9.04131 19.8403 10.733 20.9883C11.5288 21.5284 12.75 21.0288 12.75 19.944L12.75 7.94158C12.75 7.58997 12.6012 7.24565 12.3258 7.00597C10.4081 5.33741 8.2831 4.51178 5.82979 4.30379ZM3.75 7.83248C3.75 6.61426 4.67048 5.71089 5.70307 5.79843C7.82495 5.97832 9.61558 6.66822 11.25 8.05915L11.25 19.534C9.38484 18.3547 7.34843 17.7934 5.10985 17.6338C4.32785 17.578 3.75 16.9709 3.75 16.2865L3.75 7.83248Z" fill-rule="evenodd" fill="#000000" ></path><path d="M18.1702 4.30379C20.2542 4.12711 21.75 5.92291 21.75 7.83248L21.75 16.2865C21.75 17.8556 20.4625 19.0255 18.9968 19.13C16.8337 19.2842 14.9587 19.8403 13.267 20.9883C12.4712 21.5284 11.25 21.0288 11.25 19.944L11.25 7.94158C11.25 7.58997 11.3988 7.24565 11.6742 7.00597C13.5919 5.33741 15.7169 4.51178 18.1702 4.30379ZM20.25 7.83248C20.25 6.61426 19.3295 5.71089 18.2969 5.79843C16.1751 5.97832 14.3844 6.66822 12.75 8.05915L12.75 19.534C14.6152 18.3547 16.6516 17.7934 18.8901 17.6338C19.6721 17.578 20.25 16.9709 20.25 16.2865L20.25 7.83248Z" fill-rule="evenodd" fill="#000000" ></path><path d="M14.0735 14.1055C15.3886 13.1961 16.8675 12.9368 18.518 12.9762C18.9321 12.9861 19.2597 13.3298 19.2499 13.7439C19.24 14.158 18.8963 14.4857 18.4822 14.4758C17.0105 14.4407 15.8866 14.6755 14.9266 15.3393C14.5859 15.5749 14.1188 15.4897 13.8832 15.149C13.6476 14.8083 13.7328 14.3411 14.0735 14.1055Z" fill-rule="evenodd" fill="#AEAEAE" ></path><path d="M9.9265 14.1055C8.61139 13.1961 7.13249 12.9368 5.48204 12.9762C5.06794 12.9861 4.74026 13.3298 4.75015 13.7439C4.76003 14.158 5.10373 14.4857 5.51783 14.4758C6.98947 14.4407 8.11342 14.6755 9.07336 15.3393C9.41406 15.5749 9.88122 15.4897 10.1168 15.149C10.3524 14.8083 10.2672 14.3411 9.9265 14.1055Z" fill-rule="evenodd" fill="#AEAEAE" ></path><path d="M14.0735 10.0737C15.3886 9.16433 16.8675 8.90502 18.518 8.94441C18.9321 8.9543 19.2597 9.298 19.2499 9.71209C19.24 10.1262 18.8963 10.4539 18.4822 10.444C17.0105 10.4089 15.8866 10.6437 14.9266 11.3075C14.5859 11.5431 14.1188 11.4579 13.8832 11.1172C13.6476 10.7765 13.7328 10.3093 14.0735 10.0737Z" fill-rule="evenodd" fill="#AEAEAE" ></path><path d="M9.9265 10.0737C8.61139 9.16433 7.13249 8.90502 5.48204 8.94441C5.06794 8.9543 4.74026 9.298 4.75015 9.71209C4.76003 10.1262 5.10373 10.4539 5.51783 10.444C6.98947 10.4089 8.11342 10.6437 9.07336 11.3075C9.41406 11.5431 9.88122 11.4579 10.1168 11.1172C10.3524 10.7765 10.2672 10.3093 9.9265 10.0737Z" fill-rule="evenodd" fill="#AEAEAE" ></path></svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -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")