IQKeyboardManager change the done button text iOS swift

 Problem:

    I'm using IQkeyboard manager for textfield done and next options.I want to change the done button text as Cancel.How can i achieve that?

Solution:

Set the textfield delegate to self.Also in begin editing you can set the text as like below..

extension myVC:UITextFieldDelegate {

    func textFieldDidBeginEditing(_ textField: UITextField) {

IQKeyboardManager.shared.toolbarDoneBarButtonItemText = "Cancel"

}

}

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

store cgpoint in userdefaults iOS swift