|
Until SwiftUI gives us Accessory buttons for the keyboard, It looks like the best option is to use a UIViewRepresentable. My goal is to still have a cancel / clear / done button on top of the keyboard. The buttons show up on the keyboard, but when clicked do nothing. The textFieldShouldReturn is called and works properly. What am I missing? Oh, and I know the functions don't actually do anything but print to the console, but I can get that working.
|
|
Hey, It seems like you're missing some of the conceptual basics regarding Cocoa's target-action system. The
But since you don't seem to have much experience with target-action, I suggest you take a look at the "new"
Target-action is of course still a very valid approach, just throught I'd throw this here for completeness. |
SPONSORED From March 20th to 26th, you can join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer!
Sponsor Hacking with Swift and reach the world's largest Swift community!
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.