I have a simple SwiftUI Text
:
Text(t) .font(Font.system(size: 9))
Strangely its ideal height seems to be larger when it is empty.
I initially observed this in a custom Layout
container that wasn't working quite right. Eventually I looked at the height returned by v.dimensions(in:)
, and found that when t
is non-empty the height is 11; when empty, it's 14.
Subsequently I observed similar behaviour in a regular VStack
container.
Has anyone seen anything similar? Are there any properties that could affect this behaviour?
(This is on a watch - I don't know if that matters.)