0

I'm doing an iPad app. I'm developing a custom keyboard. However, when I click on the textfield the default keyboard pops up. I want to prevent that disabling the keyboard.

I saw some similar posts here where they put a dummy View on top, or they disable the editing, but that won't do what I want.

enter image description here

2
  • 2
    Irrelevant to the question, but I don't think you can type a valid email using the keyboard shown. Commented Nov 26, 2018 at 17:07
  • That's a mockup. The real one has a @ on it. Commented Nov 26, 2018 at 17:27

2 Answers 2

1

This might help you solve your problem.

iOS hide default keyboard and open custom keyboard

Essentially you need to hide the default keyboard and then present your custom keyboard.

Sign up to request clarification or add additional context in comments.

Comments

1

Using this you can disable normal keyboard

textField.inputView = UIView()

so putting your custom view can make the work

textField.inputView = YourKeyboard()

EDIT 2

Try to put this

youtTextField.inputAssistantItem.leadingBarButtonGroups.removeAll()
yourTextField.inputAssistantItem.trailingBarButtonGroups.removeAll()

2 Comments

It is crashing when I put that. This is what I get: 2018-11-26 12:23:19.922720-0500 Cleaner Pay[4067:403821] *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<UICompatibilityInputViewController: 0x7f9efd50a5f0> should have parent view controller:<Cleaner_Pay.LoginVC: 0x7f9efd4083f0> but requested parent is:<UIInputWindowController: 0x7f9efd898e00>'. Any idea? I'll post the code here in a few.
Code too long to paste it here. But is not working. I tested it in an iPhone app and it works. But for some reason, in the iPad app, it puts the keyboard smaller below and not clickable.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.