This is a companion discussion topic for the original entry at https://www.raywenderlich.com/17493408-your-first-ios-and-swiftui-app-an-app-from-scratch/lessons/8
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/17493408-your-first-ios-and-swiftui-app-an-app-from-scratch/lessons/8
When running the app on a real iPhone X, the background of the “Hit Me” button animates oddly. When going from portrait to landscape, it disappears and reappears, and when going from landscape to portrait, it appears in the upper left corner, and “slides” into position. This is just the background, not the button or text. I tried removing the gradient and the ZStack, and it does it even if the background is just “Color(“ButtonColor”)”. Any ideas what’s wrong or where I can start to debug it?
If you have a problem with Xcode 12 and the Slider you can declare an @State private var numberOfSlide: Double = 50 and pass this variable to the constant like this Slider(value: $numberOfSlide, in: 1…100)