I'm using ViewThatFits
to handle different screen sizes as well as the orientation of the phone. Essentially, I have a smaller view that should only be used in portrait mode on the phone and a larger view that should be used in every other instance.
The issue is that both of those views have a Text
view that is bound to a String
within a SwiftData model.
If the String
is too long the ViewThatFits
considers that when choosing the appropriate subview. This results in a list of items where most items use one view while one or more may use the other view.
It would be great if there was a modifier that could be applied to the Text
view that resulted in the ViewThatFits ignoring it when determining the appropriate subview.
Until such a modifier is available, has anyone come up with creative ways around this?