【问题标题】:How to open emoji keyboard by swift如何快速打开表情符号键盘
【发布时间】:2020-05-02 00:57:33
【问题描述】:

我在视图上放置了一个文本字段,如果我键入该文本字段,则会显示一个键盘。我可以单击键盘上的输入更改按钮将输入语言更改为表情符号。现在我想让带有表情符号输入的键盘作为默认键盘。如何在 ios 上使用 swift 实现?

【问题讨论】:

标签: ios swift


【解决方案1】:

不,这是不可能的 - 用户只能在设置中更改他们的语言。

表情符号键盘实际上是用户必须进行的language 设置,我们无法影响它。

keyboardType 有一个UITextField 属性:

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;

【讨论】:

猜你喜欢
  • 2018-03-25
  • 2020-02-09
  • 2017-09-11
  • 1970-01-01
  • 2017-01-17
  • 1970-01-01
  • 2021-05-29
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多