IQKeyboardManager conflicting with DownPicker

287 views Asked by At

I am using IQKeyboardManager for my whole project. I want to use DownPicker for 2 textfields in the same view. I want DownPicker to be used as custom wrapper. The problem is that my DownPicker works with only either of both textfields at one page load. Both these third-party libraries are conflicting with each other. Please give me some solution to this. My code is as follows :

@IBOutlet weak var textField: UITextField!
    var picker:DownPicker!
    @IBOutlet weak var textField1: UITextField!
    var picker1:DownPicker!

let arr:NSMutableArray = ["1","2","3"]
let arr1:NSMutableArray = ["4","5","6"]

override func viewDidLoad() {
    super.viewDidLoad()


    picker = DownPicker(textField: textField, withData: arr)

    picker1 = DownPicker(textField: textField1, withData: arr1)
}
1

There are 1 answers

0
JustinM On BEST ANSWER

Right on the IQKeyboardManager website it states:

"If IQKeybaordManager conflicts with other third-party library, then it's developer responsibility to enable/disable IQKeyboardManager when presenting/dismissing third-party library UI. Third-party libraries are not responsible to handle IQKeyboardManager."

So, you either can't use DownPicker or need to turn off IQKeyboardManager when you do use DownPicker. To temporarily turn off IQKeyboardManager you add this code.

IQKeyboardManager.sharedManager().enable = true/false