fatbobman

joined 1 year ago
 

Text is heavily used in SwiftUI. Compared to its counterparts in UIKit/AppKit, Text requires no configuration and works out of the box, but this also means developers lose more control over it. In this article, I will demonstrate through a real-world case study how to accomplish seemingly “impossible” tasks with SwiftUI’s approach: finding the first view among a given set where text is not truncated, and using it as the required size.

 

Fatbobman’s Swift Weekly #092 is out! High Temperatures and Strange Atmospheric Phenomena

  • 🌟 My Month with Claude Code
  • ⏰ Schedule a Countdown Timer with AlarmKit
  • 📱 Using the Swift Android SDK
  • 🔎 Improving SwiftUI Performance

and more...

 

Swift’s Multi-Platform Strategy Requires Collective Effort

  • ⭐ NotificationCenter.Message
  • 🚀 Xcode’s Coding Intelligence Prompt
  • 🔐 Memory Efficiency in iOS

and more...

 

NotificationCenter has long been a staple of iOS development, offering developers a flexible broadcast–subscribe mechanism. However, as Swift’s concurrency model has advanced, the traditional approach—using string-based identifiers and a userInfo dictionary—has revealed several pitfalls: thread-safety hazards, silent typos, and unsafe type casts. These issues often only surface at runtime.

To eliminate these pain points, Swift 6.2 introduces a brand-new, concurrency-safe notification protocols in Foundation: NotificationCenter.MainActorMessage and NotificationCenter.AsyncMessage. Leveraging Swift’s type system and concurrency isolation, it validates both posting and observing at compile time, completely eradicating common problems like “wrong thread” or “payload type mismatch.”

 

Fatbobman’s Swift Weekly #090 is out! You Only Realize Its Value Once It’s Gone

  • 🔍 layoutPriority in SwiftUI ZStack
  • 🚀 Exploring the Limits of On-Device AI
  • 📈 Exploring a New Visual Language: Liquid Glass
  • 🧩 What's New in SwiftUI for iOS 26

and more...

 

In SwiftUI’s layout system, the .layoutPriority modifier might seem inconspicuous at first glance, yet it can decisively influence a view’s size allocation when it matters most. Most developers know its “magic”—in a VStack or HStack, a higher priority view will fight for more space when things get cramped. But did you realize that .layoutPriority can work wonders in a ZStack too? Its behavior there is entirely different from VStack and HStack. In this article, we’ll dive deep into this little-known feature and show you how to harness layout priority inside a ZStack.

 

Fatbobman’s Swift Weekly #089 is out! WWDC 2025: A Return to Pragmatism

  • ✨ A (Re-)Introduction to ExtensionKit
  • 🌌 SwiftData vs SQL Query Builder
  • 🌊 llm .codes : Make Apple Docs AI-Readable
  • 🎶 Dragula : Drag-and-Drop Solution for SwiftUI

and more...

 

WWDC 2025 introduced a host of eye-catching new features and APIs. In this special issue, we’ve handpicked high-value analysis articles, practical tools, and key takeaways from the developer community to help you quickly master the essentials of these new capabilities. Content will continue to be updated through the end of the week.

 

WWDC 2025 arrived right on schedule. Apple released all session videos at once, allowing developers to dive into the new features and APIs they care about without delay. After skimming through them over the past two days, my initial takeaway for this year’s conference is: as expected, yet unexpected.

 

Fatbobman’s Swift Weekly #087 is out!

Swift: New Design, New Case Study, New Experience

  • 🌟 Notepad.exe: A Lightweight Swift Code Editor
  • 🌠 WWDC 2025 Wish List Roundup
  • 🎵 DataScout for SwiftData

and more...

 

Xcode Playgrounds has strayed from its original purpose, and VSCode can be too complex for beginners. So, how can we set up a simple Swift learning environment? Notepad.exe might just be the solution.

 

Fatbobman’s Swift Weekly #086 is out! Arc, Dia, TCA and SwiftUI

  • ✨ Swift 6 Refactoring in a Camera App
  • 🌌 Making Your iOS App More Accessible with Dynamic Type
  • 🚀 SkyLightWindow
  • 🔒 Forming an Opinion on SwiftUI Forms

... and more

view more: next ›