When I run the following code and change "Is On", I get a problem with the layout of the Picker.
There is no problem when using Text(), but when using only Image, it works fine on iOS but there is a problem on macOS.
Tested on macOS 26.1, Xcode 26.1.
import SwiftUI
struct ContentView: View {
@State var model = Model()
var body: some View {
Form {
Picker("Category", selection: $model.category) {
ForEach(Category.allCases) { item in
Image(systemName: item.icon)
.tag(item)
}
}
.pickerStyle(.segmented)
Toggle("Is On", isOn: $model.isOn)
}
.formStyle(.grouped)
}
}
struct Model {
var category: Category = .a
var isOn: Bool = false
}
enum Category: Int, Identifiable, CaseIterable {
case a, b, c
var id: Int { rawValue }
var icon: String {
switch self {
case .a: return "a.circle.fill"
case .b: return "b.circle.fill"
case .c: return "c.circle.fill"
}
}
var name: String {
switch self {
case .a: return "a"
case .b: return "b"
case .c: return "c"
}
}
}
code-block