1

My current assignment is an iOS Keyboard Extension. Now, to pass App Store Review, the containing app has to provide some "real" content. I thought about letting the user test the keyboard before enabling it in the Settings. So my storyboard looks like this (reduced to show relevant stuff):

└ ViewController
  └ View
    ├ TextField
    └ Keyboard Container
      └ KeyboardViewController

This works all right, the keyboard shows in the container, but - as the textDocumentProxy object in the keyboard's view controller isn't attached to anything - the user can't see what s/he's typing.

Now I'm looking for a way to "attach" the keyboard to the text field, while keeping the system keyboard out of the way so the user can type on the custom one.

I already managed to get the system keyboard away by attaching the following function to the textfield's editing did begin action.

@IBAction func editingBegan(sender: UITextField) {
    sender.endEditing(true)
}
4

1 に答える 1