Closed jan-martenn closed 1 month ago
@jan-martenn Thanks for reporting on your experience. That's a fair point. I think the requirement for conforming to CustomStringConvertable
can be removed, and I'll also add a note to the documentation about conforming to CustomStringConvertable
if people want to customize the plain style representation.
Confirmed working, thanks for the quick response! 🫡📈
Situation
Wrong initialiser used when I was using this struct:
with this code:
`
I wanted a Multiple option picker, but could not find the reason this was not working. So I CMD + Clicked on the MultiPicker to see what Initialiser was being used, turns out the selection property was set to single.
After I commented out the other intialisers except for the Binding<Set<>> one, Xcode finally gave the error that my struct needed to conform to CustomStringConvertible.
Finally, after adding this to the struct like this:
it works perfectly!
Solution
Either add to the documentation that a custom struct must conform to CustomStringConvertible, or some kind of extra check to get the correct initialiser. Thanks!!