简体   繁体   English

如何快速打开表情符号键盘

[英]How to open emoji keyboard by swift

I put a textfield on a view and if I type the textfield a keyboard will be shown.我在视图上放置了一个文本字段,如果我输入文本字段,则会显示一个键盘。 I can click on the input change button on the keyboard to change input language to emoji.我可以单击键盘上的输入更改按钮将输入语言更改为表情符号。 Now I want to let the keyboard shown with emoji input as the default one.现在我想让显示表情符号输入的键盘作为默认键盘。 How can I make it on ios with swift?我怎样才能在 ios 上快速制作它?

No this is not possible - user can only change their language in the settings.不,这是不可能的- 用户只能在设置中更改他们的语言。

The Emoji keyboard is effectively a language setting that the user has to make and we cannot influence that.表情符号键盘实际上是用户必须进行的language设置,我们无法影响它。

There is a keyboardType property for a UITextField : UITextField有一个keyboardType属性:

typedef enum {
    UIKeyboardTypeDefault,                // Default type for the current input method.
    UIKeyboardTypeASCIICapable,           // Displays a keyboard which can enter ASCII characters, non-ASCII keyboards remain active
    UIKeyboardTypeNumbersAndPunctuation,  // Numbers and assorted punctuation.
    UIKeyboardTypeURL,                    // A type optimized for URL entry (shows . / .com prominently).
    UIKeyboardTypeNumberPad,              // A number pad (0-9). Suitable for PIN entry.
    UIKeyboardTypePhonePad,               // A phone pad (1-9, *, 0, #, with letters under the numbers).
    UIKeyboardTypeNamePhonePad,           // A type optimized for entering a person's name or phone number.
    UIKeyboardTypeEmailAddress,           // A type optimized for multiple email address entry (shows space @ . prominently).
    UIKeyboardTypeDecimalPad,             // A number pad including a decimal point
    UIKeyboardTypeTwitter,                // Optimized for entering Twitter messages (shows # and @)
    UIKeyboardTypeWebSearch,              // Optimized for URL and search term entry (shows space and .)

    UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable, // Deprecated

} UIKeyboardType;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM