SwiftMath
SwiftMath copied to clipboard
View size when wrapped in SwiftUI view
I'm using the provided code to wrap SwiftMath in a SwiftUI View. But the default size of that view seems to be infinity in both directions, regardless of the actual size of the content. That's quite different behaviour from most SwiftUI Views, including Text. Makes it difficult to use alongside other items as the layout gets broken. I would expect the default size of the view to be no more than the equation content plus the insets (if there are any). Any ideas? Thanks!
Actually ignore that, sorry, sorted it out with .fixedSize() with reduces the frame down to the minimum required for the maths content.