@lvalenta No, per the docs: "fixedSize() – Fixes this view at its ideal size."
https://developer.apple.com/documentation/swiftui/view/fixedsize%28%29
@lvalenta it would propose 0/0 to the view and get the minimum size, per:
Color.blue
.frame(
minWidth: 10,
idealWidth: 150,
maxWidth: 300,
minHeight: 20,
idealHeight: 100,
maxHeight: 300
)
.fixedSize()
@dlx aha, now i know what you mean, thank you. I think you can create the modifier yourself, with frame(width: 0).:
Color.blue
.frame(
minWidth: 10,
idealWidth: 150,
maxWidth: 300,
minHeight: 20,
idealHeight: 100,
maxHeight: 300
)
.frame(width: 0)
PS: pardon me, I never played with fixedSize + frame with min and idealWidth, mostly with Text or HStack.
@lvalenta No, `frame(width: 0, height: 0)` doesn't do it because the resulting view now has size zero, not whatever the min width of the original view was, e.g.:
Color.blue
.frame(
minWidth: 10,
idealWidth: 150,
maxWidth: 300,
minHeight: 20,
idealHeight: 100,
maxHeight: 300
)
.frame(width: 0, height: 0)
.clipped()
clips the entire view.