Subtitles section Play video
In iOS 18, we can easily create mesh gradients to improve the look and feel of our app.
在 iOS 18 中,我們可以輕鬆創建網格漸變來改善應用程序的外觀和感覺。
And as you can see here, they can also be animated for that little extra special something.
正如您在這裡所看到的,它們還可以製作成動畫,以獲得額外的特殊效果。
I've seen them used in a foreground style for a text, which is pretty cool.
我見過將它們用於文字的前景風格,非常酷。
Also on buttons in like an animated border around a button.
在按鈕上,還可以在按鈕周圍添加動畫邊框。
And even that new Siri animation looks like a mesh gradient to me.
即使是新的 Siri 動畫,在我看來也像是網格漸變。
And when done subtly, I think these look amazing.
如果做得巧妙,我覺得這些東西看起來就非常棒。
My worry, though, is now that it's so easy, we're just going to see mesh gradients everywhere.
不過,我擔心的是,現在這麼容易,我們會看到到處都是網格漸變。
So my advice, use them sparingly, keep it subtle.
所以我的建議是,少用它們,保持含蓄。
Today's video is sponsored by Squarespace.
今天的視頻由 Squarespace 贊助。
We can now transition from one view to another using a zoom transition.
現在,我們可以使用縮放轉換從一個視圖過渡到另一個視圖。
And when you use this, it replaces the old slide in from the left transition with a zoom.
當你使用這個功能時,它會用縮放取代原來的從左滑入過渡。
And when you tap the back button, it collapses back into the item that it came from.
當你點擊後退按鈕時,它就會縮回到原來的項目中。
And this zoom transition also works with sheets or full screen covers.
這種縮放過渡也適用於片材或全屏封面。
And it just feels so natural on a grid UI to zoom in out of the item and then collapse back into the item when you tap on it.
在網格用戶界面上,將項目放大,然後點擊它時再摺疊回項目,感覺非常自然。
I'm a huge fan of this edition.
我是這一版本的超級粉絲。
I'm going to be using it in many, many places.
我會在很多很多地方使用它。
But again, use it when appropriate.
但還是那句話,在適當的時候使用。
Don't overdo it.
不要做得太過火。
I am in love with SF Symbols, and they just keep getting better year after year.
我愛上了 SF 符號,它們一年比一年好。
And that's no different this year with SF Symbols 6.
今年的《SF 符號 6》也不例外。
We get 800 new symbols, which brings the count up to over 6,000, as well as new animations like wiggle.
我們獲得了 800 個新符號,使符號數量超過了 6000 個,同時還獲得了新的動畫,如搖擺。
Breathe.
呼吸。
And rotate, which rotates intelligently, it doesn't rotate the entire symbol, just rotates the appropriate element of the symbol.
而旋轉則是智能旋轉,它不會旋轉整個符號,只會旋轉符號中的適當元素。
And the dot replace animation gets replaced with magic replace.
點替換動畫會被魔法替換所取代。
And as you see here, it just intelligently changes icons, like if a badge pops up on the same icon or a slash goes through it.
正如你在這裡看到的,它只是智能地更改圖標,比如在同一個圖標上彈出一個徽章,或者一條斜線穿過它。
Just a nice little touch.
只是一個很好的小插曲。
So more symbols, more animations.
是以,更多的符號,更多的動畫。
Love it.
我喜歡
On iPad, the tab bar over on the side can now float up at the top, freeing up all that screen real estate for your content.
在 iPad 上,側邊的標籤欄現在可以浮動到頂部,從而騰出更多的螢幕空間來顯示內容。
And the user gets to pick and choose what goes into that floating tab bar so they can put what they use most up there and hide things they don't often use.
用戶可以自行選擇浮動標籤欄中的內容,這樣他們就可以把最常用的內容放在浮動標籤欄中,而把不常用的內容隱藏起來。
And you can even adapt a similar behavior on Mac OS by styling the tab bar to appear as a segment to control in the toolbar.
你甚至可以在 Mac OS 上調整類似的行為,將標籤欄設計為工具欄中的控制段。
For the iPads, this is a way better experience, in my opinion, and I can't wait to build this into Creator View.
在我看來,對於 iPad 來說,這是一種更好的體驗,我迫不及待地想把它添加到 "創作者視圖 "中。
Speaking of building things into Creator View, you know, sometimes it's just the little things in life that are just oh so sweet.
說到在 "造物主視角 "中建造一些東西,你知道,有時生活中的一些小事就是那麼溫馨。
And this next improvement is a small one, but I love it.
下一個改進雖然很小,但我很喜歡。
You can now indicate sheet size on the iPad.
現在您可以在 iPad 上顯示紙張大小。
For example, you can indicate .form so you get a proper size sheet for a form, not this gigantic, unnecessary sheet for a small form.
例如,您可以標明 .form,這樣就能為表格獲取合適大小的紙張,而不是為小表格獲取巨大的、不必要的紙張。
Now I know this small form could be a popover view like you see like on the Calendar app, but it's just to demonstrate how ridiculous the sheet size is.
我知道這個小表單可以是一個彈出式視圖,就像你在日曆應用中看到的那樣,但這只是為了證明表單大小是多麼可笑。
But no more, no more.
但沒有了,沒有了。
We can indicate .form to get a much smaller, more reasonable sheet size.
我們可以使用 .form 來獲得更小、更合理的紙張尺寸。
Or better yet, you can specify a custom size to make it however you like.
更妙的是,您還可以指定自定義尺寸,隨心所欲地製作。
So no more giant sheets for everything on iPad.
這樣,iPad 上就不會再有什麼巨型紙張了。
This is great.
這太棒了。
The new text format for date reference is awesome.
新的日期參考文本格式非常棒。
As you can see on the screen, you pass the text in two dates, right?
正如您在螢幕上看到的,您在兩個日期中傳遞文本,對嗎?
We have current date and next song date, and it can generate a reference, offset or timer based on those two dates in a wide variety of formats.
我們有當前日期和下一首歌曲的日期,它可以根據這兩個日期以多種格式生成參考、偏移或計時器。
As you see here on the screen, this builds on the relatively new formatter API that was introduced in iOS 15.
正如你在螢幕上看到的那樣,它基於 iOS 15 中引入的相對較新的格式化 API。
And if you haven't worked with that yet or checked it out, definitely go to gosh darn format syntax, scroll through there.
如果你還沒有使用過或查看過,一定要去天哪格式文法,在那裡滾動查看。
Like, it's amazing how powerful these are.
就像,這些東西的威力真是驚人。
I use them extensively in my apps, and it's just been such a time saver.
我在我的應用程序中廣泛使用了它們,這讓我節省了很多時間。
They're so nice to use.
它們用起來真不錯。
Now, if you're here staying up to date on the latest and greatest in Swift UI, I know you're building some pretty great apps, and it's best to have a personal website to showcase your work.
現在,如果你在這裡瞭解 Swift UI 的最新動態,我知道你正在開發一些非常棒的應用程序,最好有一個個人網站來展示你的作品。
And that brings me to today's sponsor, Squarespace.
這就是今天的贊助商 Squarespace。
Squarespace is an all in one platform to help you get that iOS developer portfolio up and running very quickly.
Squarespace 是一個集所有功能於一身的平臺,可幫助您快速創建並運行 iOS 開發人員的作品集。
Now I know we're developers.
現在我知道我們是開發人員了。
We can build a website ourself, but we're also iOS developers.
我們可以自己建網站,但我們也是 iOS 開發人員。
And I would argue there's an opportunity cost of your time.
我想說的是,你的時間是有機會成本的。
Now, do you want to spend your time learning about web development, responsive design, all the different browsers, or do you want to spend your time building apps?
現在,你是想把時間花在學習網頁開發、響應式設計、各種不同的瀏覽器上,還是想把時間花在開發應用程序上?
So that's why I always recommend letting Squarespace take that off your plate to build your iOS developer portfolio.
是以,我一直建議讓 Squarespace 幫你建立 iOS 開發人員的作品集。
They have all kinds of beautiful themes and templates to get you started.
他們有各種精美的主題和模板供您開始使用。
And you can use their next generation website editor with the fluid engine to just really unlock all the creativity in the world.
你還可以使用他們的下一代網站編輯器和流體引擎,真正釋放世界上所有的創造力。
You can even use Squarespace blueprint and Squarespace AI to help you figure out what to write on your website.
您甚至可以使用 Squarespace 藍圖和 Squarespace AI 來幫助您確定網站內容。
Cause that's always the hardest part.
因為這總是最難的部分。
Like I don't even know what to say here.
我都不知道該說什麼好了。
Throw it into Squarespace's AI and they'll help you out.
把它扔到 Squarespace 的人工智能中,他們就會幫你解決。
They handle all the SEO and analytics for you.
他們為您處理所有搜索引擎優化和分析工作。
Again, Squarespace handling your website just takes so much off your plate.
同樣,Squarespace 可以為您的網站省去很多麻煩。
So when you're ready to get started, go to squarespace.com.
是以,當您準備好開始使用時,請訪問 squarespace.com。
And when you're ready to launch, go to squarespace.com slash Sean Allen to get 10% off your first purchase of a website or domain.
當你準備好啟動網站時,訪問 squarespace.com slash Sean Allen,首次購買網站或域名可享受九折優惠。