|
I have a problem with the OK button I add to the keyboard via the toolbar. The input via the keyboard is to be terminated via the OK button. This also works until I present an alert to inform the user of an incorrect entry. After that, the OK button no longer works, or sometimes it is no longer visible after I have confirmed the alert. In addition, I only have this behaviour when I present the view for input via a sheet. It is very confusing, so here is a short example of code that illustrates the problem. ContentView:
AddView
In the main screen, even after an invalid number "50,,,10" has been entered, the input works perfectly, i.e. the OK is still effective after the alert has been confirmed. If I open a sheet via the € button, which has the same code as the main screen, then the button is disabled after an invalid number has been entered and the alert has been confirmed. It would be really great if someone has an idea what I am doing wrong. |
|
Hi, I managed to get it to work putting the
|
|
Thanks a lot @Hectorcrdna! That was exactly the solution, so simple, but you have to come up with it :-) |
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.