How to show both image and text in a Picker's popup on Mac Catalyst

53 Views Asked by At

is there a way to show both an image and text in a Picker's popup on Mac Catalyst, as it works on iOS? Tests were done on Mac 13.6 (both Scaled to Match iPad and Optimized for Mac) and iOS 17.0. Do I have to write a custom picker? Thank you

import SwiftUI

struct ContentView: View {
    @State var selection = ""
    
    var body: some View {
        Picker ("", selection: $selection) {
            Label { Text("1") } icon: {
                Image(systemName: "circle").foregroundStyle(.red, .blue)
            }
        }
    }
}

@main
struct TestImagePickerApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

iOS screenshot iOS screenshot

Mac Catalyst - Scaled to Match iPad screenshot Mac Catalyst - Scaled to Match iPad screenshot

Mac Catalyst - Optimized for Mac screenshot Mac Catalyst - Optimized for Mac screenshot

0

There are 0 best solutions below