I'm trying to use the new .formStyle(.insetGrouped)
, as mentioned in the WWDC 2022 presentation "What's new in AppKit". However, I don't see it in the documentation for FormStyle, and the following code below fails to compile because it's not a member:
import AppKit
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
@State var text = ""
@State var toggle = false
var body: some View {
Form {
TextField("Text", text: $text)
Toggle("Toggle", isOn: $toggle)
}
.formStyle(.insetGrouped)
}
}
PlaygroundPage.current.setLiveView(ContentView())
Am I missing something here (i.e. declaring some SDK version)?