0
我把文本字段放在視圖上,如果我鍵入文本字段,鍵盤將顯示。我可以單擊鍵盤上的輸入更改按鈕將輸入語言更改爲表情符號。現在我想讓鍵盤與默認輸入一起顯示爲默認值。我怎樣才能在iOS上使用swift?如何通過swift打開表情符號鍵盤
我把文本字段放在視圖上,如果我鍵入文本字段,鍵盤將顯示。我可以單擊鍵盤上的輸入更改按鈕將輸入語言更改爲表情符號。現在我想讓鍵盤與默認輸入一起顯示爲默認值。我怎樣才能在iOS上使用swift?如何通過swift打開表情符號鍵盤
不,這是不可能的 - 用戶只能在設置中更改他們的語言。
表情符號鍵盤實際上是用戶必須設置的language
設置,我們不能影響該設置。
有一個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;