Questions tagged [swiftui-environment]
141 questions
-1
votes
1 answer
SwiftUI View doesn't change when using button and @State / @Binding
Long story short this is an onboarding view after a user goes through auth. My main navigation of the app uses navigationview but I can't use that for onboarding. I've put a fullscreencover over the main screen for this onboarding stuff.
However,…

Zach Wadzinski
- 9
- 2
-1
votes
1 answer
Keyboard handling swiftui
Hi I want to keep the keyboard up while navigation link happens or first dismiss the keyboard when button is tapped and then navigate when keyboard is fully dismissed in SwiftUI?
Can someone help me?

user12723399
- 127
- 1
- 1
- 5
-1
votes
1 answer
Button color to be changed depending on the state (normal, highlighted, disabled) in SwiftUI?
Instead of setting colors manually,Is it possible to set the colors for different states(normal, highlighted, disabled)?
var color: Color
{
return condition ? .red : .blue
}
So I have set the color change this way but is it possible to change it…

user12723399
- 127
- 1
- 1
- 5
-2
votes
1 answer
Reset member variable of environmentObject after it is set but before view is drawn
I am making the auth portion of the app (login,register,forgot password pages). since i have a function that handles the errors which i call for all the different transactions (log in, log out, register user, etc) and if it catches that error then…

barryalan2633
- 610
- 7
- 21
-2
votes
1 answer
how to exit the loop and come to the ContentView swiftUI
Onboarding screen, Signup and Password recovery I'm working on this link project.
How can I go to the ContentView after login?, how do I get out of the loop and come to the ContentView?
I would be happy if you help..

Mert Ala
- 1
-3
votes
1 answer
Value of type 'some View' has no member 'if'
I have the following chunk of code in a SwiftUI app:
struct BtnTxtView: View {
var theLabel:String
var highLight: Bool
var body: some View {
let crnrRad:CGFloat = 5.0
Text(theLabel)
.foregroundColor(.blue)
…

Michel
- 10,303
- 17
- 82
- 179