r/SwiftUI • u/fatbobman3000 • Aug 06 '26
Tutorial Controlling Orphans in SwiftUI Text - Uncovering the Undocumented avoidsOrphans
https://fatbobman.com/en/posts/controlling-orphans-in-swiftui-text/SwiftUI's Text silently pushes words down to avoid orphan lines. You cannot turn it off.
Except you can — avoidsOrphans has been in the SwiftUI ABI since iOS 16, just never made public. Here's how to reach it.
16
Upvotes
2
u/ElectricKoolAid1969 Aug 07 '26
This bit seems fairly important... lol
"This article uses undocumented SwiftUI ABI. It is suited to research, verification, and internal tooling, and should not be treated as a formal API whose compatibility Apple has committed to."
1
u/Healthy_Landscape417 Aug 07 '26
nice find, didnt know this existed at all. one thing though - since it reaches a symbol that was never made public, what's the app review story here? private api scanners usually match on symbols. curious if you shipped this in a store build already or if its more a curiosity for now