|
What I have is sort of working, but I don't think it is the best way of doing it. I want to create a custom TextField, where I can do 2 things (and I need to do both things).
So how I accomplish both of these items (extension of TextField and a View Modifier?)
|
|
The way I might do this is.
then when you call the
Or just add a modiflier to the
then you can just use the standard
|
|
The init approach makes sense. I might be missing something, and I want to make sure there isn't a way for this to be done. What's the purpose of all of this? I have created accessory buttons for they keyboard. There are 3 - Cancel / Clear / Done. They pop up when the keyboard does, and move the TextFieldView above the keyboard and buttons if they would be underneath it. But as I'm using this custom TextFieldView (also has TextEditorView), it's sort of limited if anyone else ever wanted to use it. If they could use modifiers to the TextFieldView and it would translate to the TextField inside that, it would be much more versatile. I'll make another post with all the code for the buttons. |
|
You can play around with making a custom
Which ends up like: |
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.
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.