iMessage Extension: UITextField in UIViewController class brings up iMessage keyboard

471 views Asked by At

I'm currently developing a small iMessage extension app, and it's composed of 3 classes:

One MSMessagesAppViewController class called MessagesViewController and two UIViewControllers called CompactViewController and ExpandedViewController

The MessagesViewController is the parent view controller of the other two. It is responsible for transitioning between the two views when the user chooses the expanded or compact options in iMessage. I invoke the transition in my didTransitionTo() method like this:

let controller: UIViewController

controller = (presentationStyle == .compact) ? instantiateCompactVC() : instantiateExpandedVC()

addChildViewController(controller)
view.addSubview(controller.view)
controller.didMove(toParentViewController: self)

My problem lies in my ExpandedViewController class. In it, I have a text field that I intend to allow the user to type in. However, when the user taps on the text field, the iMessage keyboard pops up, instead of the default QWERTY keyboard.

I have yet to find a solution to this. I'm sure the type of keyboard that displays upon tapping the text field has something to do with the view controller or view hierarchy.

I want to allow the user to enter text normally with the default keyboard. How can I get around this?

0

There are 0 answers