Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Set The Size and Type of #Preview With PreviewTrait
Copy link
Facebook
Email
Notes
More

Set The Size and Type of #Preview With PreviewTrait

Daily Coding Tip 288

Type Safely's avatar
Type Safely
Jun 14, 2023
∙ Paid

Share this post

Type Safely
Type Safely
Set The Size and Type of #Preview With PreviewTrait
Copy link
Facebook
Email
Notes
More
Share
white and blue collage photo frame
Photo by Sandie Clarke on Unsplash
Last Tested on Xcode 15.0 beta 1

When creating a Preview with the new iOS 17 #Preview macro, there is firstly an optional name. As with any optional that has a default value of nil, not adding anything is equivalent to passing nil. The default name that is displayed when a Preview has no name is unsurprisingly Preview.

Th…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More