3 ms·
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 deve
by fatbobman 1y 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.