Custom induction for iOS keyboard types and custom induction for ios keyboard
Sometimes we cannot display the mobile phone and keyboard on the Xcode virtual machine, because we have not set the keyboard correctly:
You can do this: Make sure that the third box is also marked with a pair (Toggle Software Keyboard)
I. keyboard Style
Supports 8 types of keyboards.
- TypedefEnum {
- UIKeyboardTypeDefault, //Default keyboard: All characters are supported.
- UIKeyboardTypeASCIICapabLe, //Supports ASCII default keyboards
- UIKeyboardTypeNumbersAndPunctuation, //Standard phone keyboard, supporting + * # and other symbols
- UIKeyboardTypeURL, //URL keyboard with A. com button; only URL characters are supported
- UIKeyboardTypeNumberPad, // Numeric keypad
- UIKeyboardTypePhonePad, //Telephone keyboard
- UIKeyboardTypeNamePhonePAd, //Phone keyboard, user name supported
- UikeyboardtypeemailaddhSs, //Keyboard used to enter the email address
- }UIKeyboardType;
Usage example:
TextField. keyboardtype =UIKeyboardTypeNumberPad;
Ii. keyboard appearance
- TypedefEnum {
- UIKeyboardAppearanceDefaUlt, //Default appearance: light gray
- UIKeyboardAppearanceAlerT, // Dark gray/Graphite
- }UIKeyboardAppearance;
Usage example:
TextField. keyboardAppearance = UIKeyboardAppearanceDefaUlt;
Iii. Enter key
- TypedefEnum {
- UIReturnKeyDefault,// Default value: the gray button marked with Return
- UIReturnKeyGo, // The blue button marked with Go
- UIReturnKeyGoogle,// The blue button marked with Google for search
- UIReturnKeyJoin,// Blue button marked with Join
- UIReturnKeyNext,// The blue button marked with "Next"
- UIReturnKeyRoute,// The blue button marked with Route
- UIReturnKeySearch,// The blue button marked with Search
- UIReturnKeySend,// The blue button marked with "Send"
- UIReturnKeyYahoo,// Marked with Yahoo! To search
- UIReturnKeyDone,// The blue button marked with Done
- UIReturnKeyEmergencyCall,// Emergency call button
- }UIReturnKeyType;
Usage example:
TextField. returnKeyType = UIReturnKeyGo;
4. Change the input box to the password box
TextField. secureTextEntry = Yes;