MultiPicker icon indicating copy to clipboard operation
MultiPicker copied to clipboard

Any special concerns regarding why macOS support is missing?

Open ShikiSuen opened this issue 1 year ago • 2 comments

Just my curiosity.

ShikiSuen avatar Sep 28 '24 17:09 ShikiSuen

@ShikiSuen SwiftUI.Picker already supports optional and multi selection on macOS. This library was mainly created to fill in this gap in functionality for iOS. I'm open to making it available on macOS, but I couldn't find a design that I liked that I thought fit well with macOS UX and haven't had the time to investigate further. I'm open to suggestions and/or PRs 🙂

toastersocks avatar Oct 06 '24 21:10 toastersocks

@toastersocks

Here are my thoughts if the user interface idiom is macOS or AppKit is used for the app in lieu of UIKit (macCatalyst):

If the picker is placed inside a Form with .formStyle(.grouped), then just make it look exactly like what single picker appears in a grouped form.

Otherwise, a vertically stacked list of checkboxes should make sense.

ShikiSuen avatar Oct 07 '24 07:10 ShikiSuen

@ShikiSuen

If the picker is placed inside a Form with .formStyle(.grouped), then just make it look exactly like what single picker appears in a grouped form.

Last I checked, there's no way to query the environment to get the context that a view is appearing in, so having a separate appearance based on whether we're in a Form or not, let alone the style of the Form is SwiftUI internal API not currently available to third-party devs, unfortunately.

Otherwise, a vertically stacked list of checkboxes should make sense.

I'm curious what is the functionality you're wanting from MultiPicker on macOS that's not currently provided by SwiftUI.Picker?

toastersocks avatar Oct 26 '24 23:10 toastersocks

I'm curious what is the functionality you're wanting from MultiPicker on macOS that's not currently provided by SwiftUI.Picker?

I'm not sure. As long as it allows multiple choices, it should be fine.

ShikiSuen avatar Oct 27 '24 01:10 ShikiSuen

Ok, I'm closing this for now. Feel free to reopen/open another issue if you encounter a use case on macOS.

toastersocks avatar Oct 27 '24 12:10 toastersocks