I am experiencing a problem with Xcode 13 Beta 5 iOS 15 for the value Picker using the Wheel Style. The WheelPicker is in a frame displaying the current value, however the drag area to select a new value is offset from the area on the displayed values.
In fact I have 3 WheelPickers to select 3 values. The left-most picker has the drag area offset to the left of it, and the right-most picker has the drag area offset to the right of it. The middle-picker cannot even select a value. To me it suggests overlapping drag-areas, where the overlapped areas prevent the selection of a value. In addition I am seeing a '[SwiftUI] Invalid frame dimension (negative or non-finite).' error in the console.
Has anyone else experienced this, and therefore may know what to do?
As a note this does not happen with Xcode 12.5.1 iOS 14.5. It works fine in that case.
Further in Xcode13 beta 5 I tried setting breakpoints to catch the code calls, but they are also not working - but that is another problem.
Having contacted technical support, they have confirmed that it appears to be a regression / bug in iOS 15. I look forward to the Apple bug-fix soon, and in the meantime there is a workaround.
The workaround is, as mentioned in similar questions on this forum, to add a view modifier, in my case to the Hstacks that contained my pickers.
.compositingGroup()
As my pickers were also part of a '.popover' view, I in addition had to add the view modifier to the frame used in the popover view. So in my case it needed adding to both views (Hstack and popover).