It is possible to trigger the emoji keyboard programmatically?
I am trying to open the emoji keyboard when the user click in a button, it is possible?
Unfortunately this can't be done in iOS yet. Apple does not provide any public API to programatically switch to another input method. This is something the user has to change.
We can enable the emoji keyboard from the Setting Screen.But we can’t enable the emoji keyboard programmatically in the iPhone application to input the characters in the textfield so we need to create the custom Emoji keyboard in where you have to write all emoji unicode character and call that view when Text field will tap.
For More details to create a custom emoji view You can follow this Link
https://mindfiremobile.wordpress.com/2014/01/17/emoji-in-iphone-and-how-to-enable-it/
Here is answer:
Change the iOS keyboard layout to emoji?
After that, do follow:
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
messageTextView.keyboardType = .asciiCapable
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
messageTextView.keyboardType = .default
messageTextView.reloadInputViews()
}
After press button call: messageTextView.reloadInputViews()