IOS Keyboard Type Customization Induction

Source: Internet
Author: User

Sometimes we do not display the phone keyboard on the Xcode virtual machine, that is because we do not set the correct:

You can do this: Make sure the third box also has a checkmark (Toggle software Keyboard)

First, the keyboard style

Supports 8 styles of keyboard.

  1. typedef enum {
  2. uikeyboardtypedefault, c15> c25> // default keyboard: All characters are supported
  3. uikeyboardtypeasciicapab le, // ASCII-enabled default keyboard /c19>
  4. uikeyboardtypenumbersand punctuation, // standard telephone keypad, support +* #等符号
  5. &NBSP;       uikeyboardtypeurl,                                        < Span style= "Color:rgb (0,130,0); Word-wrap:normal; Word-break:normal ">//  URL keyboard with. com button; URL character   only;    
  6. &NBSP;       uikeyboardtypenumberpad,                            //numeric keypad      
  7. &NBSP;       uikeyboardtypephonepad,                              //&NBSP; telephone keypad      
  8. &NBSP;       uikeyboardtypenamephonep ad,                      //&NBSP; telephone keypad, Input person name   is also supported;    
  9. uikeyboardtypeemailaddre SS, // keyboard for entering e-mail addresses  
  10. } Uikeyboardtype;

Usage Use cases:

TextField. Keyboardtype = uikeyboardtypenumberpad;

Second, keyboard appearance

  1. typedef enum {
  2. uikeyboardappearancedefa ult , // default appearance: Light grey
  3. uikeyboardappearancealer T, // dark grey/graphite
  4. } uikeyboardappearance;

Usage Use cases:

TextField. Keyboardappearance=uikeyboardappearancedefault;

Third, enter

  1. typedef  enum &NBSP; {   
  2. &NBSP;       uireturnkeydefault,   //default: Gray button, Marked with return
  3. &NBSP;       uireturnkeygo,    //The blue button labeled Go
  4. &NBSP;       uireturnkeygoogle,   //blue button labeled Google Used to search for
  5. &NBSP;       uireturnkeyjoin,   //blue button labeled Join
  6. &NBSP;       uireturnkeynext,   //blue button labeled Next
  7. &NBSP;       Uireturnkeyroute,   //blue button labeled route
  8. &NBSP;       uireturnkeysearch,   //blue button labeled Search
  9. &NBSP;       uireturnkeysend,   //blue button labeled Send
  10. &NBSP;       Uireturnkeyyahoo,   //The blue button labeled Yahoo! Used to search for
  11. &NBSP;       uireturnkeydone,   //The blue button labeled done
  12. uireturnkeyemergencycall, //Emergencycall button
  13. } Uireturnkeytype;

Usage Use cases:

TextField. Returnkeytype=uireturnkeygo;

Four, the input box becomes the password box

Textfield.securetextentry=yes;

IOS Keyboard Type Customization Induction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.