Posts

Post not yet marked as solved
0 Replies
314 Views
Every example I've seen of ContainerRelativeShape uses it to match the outline of a view to the corner of a widget. I've tried that, it works well. I cannot, however, figure out how to get it to function outside of a Widget, e.g. in a normal SwiftUI iOS app. The docs say: "A shape that is replaced by an inset version of the current container shape. If no container shape was defined, is replaced by a rectangle." I've tried everything I can think of to place a ContainerRelativeShape inside another nonrectangular view, with no luck. I assume that's because the outer view is not defined as "the current container shape", but I don't see any means to accomplish that. Is ContainerRelativeShape only useful in the context of a Widget?
Posted
by CastIrony.
Last updated
.