New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SwiftUI Support #1606
Comments
Sorry, I current do not know how we can use library functions in SwiftUI. However all default functions works with SwiftUI projects. Please also let me know if you know something about it. |
So far I got some things working, but the IQPreviousNext isn't one of them |
@PedroCavaleiro Can you please share your experience with swiftUI and IQKeyboardManager? |
@hackiftekhar So far good, haven’t found any bugs on the features that I use (dismiss when tapped outside the TextField, changed the name of the toolbar button Done button and forced the next/previous keys to show up) |
@PedroCavaleiro can you share the way that you've done it please ? |
Sorry for the delayed response @MaxenceMax but I was extremely sick and did not used my computer until now. On the
|
I did a little bit testing with SwiftUI, the next/previous arrows do not appear because the SwiftUI creates a different hierarchy of views than usual. I was trying to implement some kind of |
are there going to be work to make next/previous arrow work for swiftUI? would love that. |
It would be easier to make some workaround by peoples who already know how to do it with SwiftUI. Unfortunately I'm not one of them till now, haven't got chance to learn SwiftUI. |
Hi all, I discovered that pressing the "Done" button in SwiftUi doesn't trigger the "on commit:" in the SwiftUi TextField. Any Idea how to change this behaviour? Especially, I am using the keyboardTye(.decimalPad) option where the IQKeyboardManager-Done button would come in super handy committing the keyboard and finishing the entry in the SwiftUI TextField as well. Pressing return on a the default keyboard works just fine. Thanks |
In Xcode 12 there is no any AppDelegate and we now views will allow only struct, class,enum. If anyone has implemented IQKeyboard for swiftui then please share few tips. |
You can still implement it, go to the file where the @main is located, in the example below it's called
|
It will display only Done button and Next, Previous is not working |
That's a problem that I've yet to solve. |
any update on " Next, Previous is not working"? I checked today and it's the same result. |
I haven't learned the SwiftUI yet. So I need help from peoples who already learn the swift UI to write something same like IQPreviousNextView class implemented for the Swift/ObjC. |
For me it will crash on search when i click on textfield. |
I learned the SwiftUI now and I found that it's not easy to use this library directly in SwiftUI because SwiftUI has it's own mechanism to handle keyboard input and show the textField at correct position by moving it's UI. However we may have something for previous/next and done. But in those cases onCommit doesn't fire probably. Due to these things, I think it's not a good idea at the moment to support it for SwiftUI as the general purpose use of the library is already handled by SwiftUI. |
it is not showing tool bar in swiftui |
Since I started targeting iOS 15 I no longer use IQKeyboardManager I felt that the OS was doing its thing and you could add the toolbar items on SwiftUI. I no longer know how this lib is behaving. But as @hackiftekhar said
So this lib is really not suitable to use with SwiftUI specially in the latest versions of iOS |
I wonder how we can use the IQKeyboardManager in SwiftUI.
Is there is a way to use it with toolbarPreviousNextAllowedClasses ?
The text was updated successfully, but these errors were encountered: