|
Hello all (and Paul !), Thanks for this great ressource on SwiftUI, I'm just starting out, but this looks awesome. I'm a bit stumped on the WeSplit Tutorial 8/10 : The picker does not seem to behave the way it should, or at least the way Paul describes it. Despite adding the NavigationView, I still see the disclosure arrow and taping on the picker does nothing... Here is my code :
Any ideas ? thanks |
|
I ran this snippet and I was able to click on "Number of people" and modify the value from the screen that was pushed onto the navigation stack. I've noticed some issues with preview not working correctly in Xcode with Swift UI, or having to press the "Play" button to get interactivity. Might just be an Xcode bug, so try running it on the device. |
|
Thanks for the reply Peter, When running on my device, at first, it seemed like it still was not working. After a few more tries, it turns out I need to LONG-tap on the picker in order to make the other view appear. And on that new view, I also need to long-tap on a selection before the app returns to the main screen, and in doing so, I get the following log message :
Also, the blue " < WeSplit" button on the picker view does not work. When I enter an amount, I get these 2 similar messages when I tap (once) on the textField and summon the keyboard :
And this message every time I tap on a key from the displayed keyboard :
Anyone else has the same issue ? |
|
@Esowes is there additional code you could provide? Or could you drop a link to the WeSplit project description if it's publicly available? |
|
Hey Peter, That's the whole ContentView code :
And I just modified the SceneDelegate like so (added the .onTapGesture bit), in order to be able to dismiss the keyboard by tapping outside it :
|
|
@Esowes, I was able to reproduce the error message
Take a look at Paul's article here, it'll explain why you're getting that error, and how to resolve it. https://www.hackingwithswift.com/quick-start/swiftui/how-to-create-views-in-a-loop-using-foreach With regards to your |
SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.