I want to add Scene Storage to the Text and a different variable here is some code I tried that did not work.
import SwiftUI
struct ContentView: View {
@SceneStorage("TextField") var textfield = ""
@State var Text = ""
var body: some View {
TextField("Placeholder", text: $textfield,
$Text)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: