Post

Replies

Boosts

Views

Activity

'@Environment(\.presentationMode)' broke after upgrading Xcode to 12.1(SwiftUI)
I've updated my Xcode version to 12.1 and I noticed that this alone causes issues after the update: @Environment(\.presentationMode) var presentationMode: Binding<PresentationMode> I'm using it to programmatically go back in a NavigationView:  Button(action:{     self.presentationMode.wrappedValue.dismiss() }){   Text("Back") } The Problem I'm Facing: Whenever I navigate to another page, I have this not rendering: .onAppear{ self.textTest.userInput = "Hello World" } Things I've Tried: I've tried commenting out 'presentationMode' and when I navigate the text renders on the screen so I'm sure it's this that's causing the problem. What I'm Looking For: What's another way to navigate back programmatically?
1
0
686
Nov ’20