Trouble with next/previous buttons with IQKeyboardManager

Ibrahim Yildirim picture Ibrahim Yildirim · Mar 11, 2015 · Viewed 9.1k times · Source

I am working in a Swift project where I have several input fields. I made a custom view for each of the input fields because we use them a lot in the project.

I added IQKeyboardManager to the project. It works really good, and the view gets up according to the active text field.

However, the Next/Previous buttons do not appear. I have tried setting the tags of the text fields in code like this:

slNameField.setTextField("Name", keyboardType: UIKeyboardType.NamePhonePad, image: UIImage(named: "ic_name"))
slNameField.txtField.tag = 101

slEmailField.setTextField("Email", keyboardType: UIKeyboardType.EmailAddress, image: UIImage(named: "ic_email"))
slEmailField.txtField.tag = 102

slLocationField.setTextField("City, Country", keyboardType: nil, image: UIImage(named: "ic_location"))
slLocationField.txtField.tag = 103

Here's some illustrations of the project:

The Signup Screen

Answer

Abdul Rehman picture Abdul Rehman · Apr 23, 2017

I am also stuck into same problem. As mentioned by @sam there is a very helpful demo project of the library.

Solution You only need to select the UIView in which all the textField or UIViews are. And then you just need to change it's class to

"IQPreviousNextView"

And all of the rest will be handled by the library.

Problem screen image

enter image description here

And solution is screen short

enter image description here

Hope it help :). it saved my day.