How do I get my UIView to correctly size for its content in SwiftUI?
问题 I want to use the awesome MultiSegmentPicker written by Yonat Sharon in my SwiftUI View. https://github.com/yonat/MultiSelectSegmentedControl However, I don't fully understand the interaction between the UIViewRepresentable View and my SwiftUI View. How do I get the host view controller to shrink its height down to the size of the segmented control? Here's the debugger view of the demo page - notice the blue area around the top bar: The demo code doesn't give a lot of insight into the issue,