You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple depth for IQKeyboardManager's toolbarPreviousNextAllowedClasses #517
first of all, I'd like to thank you for this awesome library, it helped me a lot :)
I'm currently trying to register a custom UIView class with a UITextField inside it, lets call it CustomTextField. I wanted to make IQKeyboardManager's built-in next and previous button enabled for it, and found that I could do it by registering the class to toolbarPreviousNextAllowedClasses.
Problem is, CustomTextField is built using XIB, using the method from this link. This will make CustomTextField have one UIView subview, which will be loaded using UINib(nibName:, bundle:), and set the owner using returned nib's instantiateWithOwner(self, options: nil). I just realized that this method will make my UITextField become a subview of CustomTextField's subview, instead of become its direct subview.
Is there any workaround for this? Is it possible to enable the next and previous button for custom views made with method above?
Apologies if similar method has been asked before. Thank you very much!
In general, CustomTextView should be on top of all UITextField. Library will detect all textFields which are inside CustomTextView even if with multiple hierarchy.
Oops, seems I logged the wrong class. It works now :)
Still, I found it only sets the toolbar's next and before button... isn't it supposed to set the Next button as replacement of the Return button on the keyboard, too?
Activity
hackiftekhar commentedon May 24, 2016
In general, CustomTextView should be on top of all UITextField. Library will detect all textFields which are inside CustomTextView even if with multiple hierarchy.
edopelawi commentedon May 27, 2016
Hmm. Is it possible to assign that class to an UIView via XIB?
edopelawi commentedon May 27, 2016
Oops, seems I logged the wrong class. It works now :)
Still, I found it only sets the toolbar's next and before button... isn't it supposed to set the
Nextbutton as replacement of theReturnbutton on the keyboard, too?hackiftekhar commentedon May 27, 2016
You should take a look at IQKeyboardReturnKeyHandler class to handle keyboard
Returnkey.edopelawi commentedon May 30, 2016
Cool, will look at that. Thanks man! :)