One 、 Keyboard style

UIKit Framework support 8 There are two styles of keyboards .

  1. typedef  enum  {
  2. UIKeyboardTypeDefault,                 //  Default keyboard : Supports all characters
  3. UIKeyboardTypeASCIICapable,            //  Support ASCII The default keyboard for
  4. UIKeyboardTypeNumbersAndPunctuation,   //  Standard phone keyboard , Support +*# Equisign
  5. UIKeyboardTypeURL,                     // URL keyboard , Yes .com Button ; Only support URL character
  6. UIKeyboardTypeNumberPad,               // The keypad
  7. UIKeyboardTypePhonePad,                //  The phone keyboard
  8. UIKeyboardTypeNamePhonePad,            //  The phone keyboard , It also supports the input of people's names
  9. UIKeyboardTypeEmailAddress,            //  Keyboard for entering e-mail address
  10. } UIKeyboardType;

Usage case :

textView.keyboardtype = UIKeyboardTypeNumberPad;

Two 、 Keyboard appearance

  1. typedef  enum  {
  2. UIKeyboardAppearanceDefault,     //  Default appearance : Light grey
  3. UIKeyboardAppearanceAlert,       // Dark grey / Graphite
  4. } UIKeyboardAppearance;

Usage case :

textView.keyboardAppearance=UIKeyboardAppearanceDefault;

3、 ... and 、 Enter key

  1. typedef  enum  {
  2. UIReturnKeyDefault,  // Default : The gray button , Be marked with Return
  3. UIReturnKeyGo,  // Be marked with Go The blue button
  4. UIReturnKeyGoogle,  // Be marked with Google The blue button , Used to search
  5. UIReturnKeyJoin,  // Be marked with Join The blue button
  6. UIReturnKeyNext,  // Be marked with Next The blue button
  7. UIReturnKeyRoute,  // Be marked with Route The blue button
  8. UIReturnKeySearch,  // Be marked with Search The blue button
  9. UIReturnKeySend,  // Be marked with Send The blue button
  10. UIReturnKeyYahoo,  // Be marked with Yahoo! The blue button , Used to search
  11. UIReturnKeyDone,  // Be marked with Done The blue button
  12. UIReturnKeyEmergencyCall,  // Emergency call button
  13. } UIReturnKeyType;

Usage case :

textView.returnKeyType=UIReturnKeyGo;

Four 、 Auto capitalization

  1. typedef  enum  {
  2. UITextAutocapitalizationTypeNone,  // No auto capitalization
  3. UITextAutocapitalizationTypeWords,  // Capitalize the first letter of a word
  4. UITextAutocapitalizationTypeSentences,  // The first letter of the sentence is capitalized
  5. UITextAutocapitalizationTypeAllCharacters,  // All capitals
  6. } UITextAutocapitalizationType;

Usage case :

textField.autocapitalizationType  =  UITextAutocapitalizationTypeWords ;

5、 ... and 、 AutoCorrect

  1. typedef  enum  {
  2. UITextAutocorrectionTypeDefault, // Default
  3. UITextAutocorrectionTypeNo, // Don't AutoCorrect
  4. UITextAutocorrectionTypeYes, // AutoCorrect
  5. } UITextAutocorrectionType;

Usage case :

textField . autocorrectionType  =  UITextAutocorrectionTypeYes ;

6、 ... and 、 Secure text input

textView.secureTextEntry=YES;

Security input is mainly used for password or some private data input , AutoCorrect and caching are disabled .

So how to set the keyboard type ?

Next , Please have a look at :

stay TextviewDelegate This method of setting :

// return NO to disallow editing. - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{

textView.keyboardtype = UIKeyboardTypeNumberPad;

//textField.returnKeyType = UIReturnKeyYahoo;//the same as search       //textField.returnKeyType = UIReturnKeyEmergencyCall; //EmergencyCall       //textField.returnKeyType = UIReturnKeyGoogle;//the same as search       textField.returnKeyType = UIReturnKeyDefault;

}

So how to control the display or hiding of a certain type of button , Can it be done ?

stay .......

IOS More articles on keyboard styles and settings

  1. Keyboard style is related to settings -iOS Development

    One . Keyboard style UIKit Framework support 8 There are two styles of keyboards . typedef  enum  { UIKeyboardTypeDefault,                 //  Default keyboard : Supports all characters UIKey ...

  2. UITextField Common attribute induction : Text box styles 、 Writing style 、 Keyboard style 、 Left and right view styles 、 Clear button settings, etc

    (1) You can set the style of the text box as needed ( Including shape . Border color . Background, etc ). (2) You can set the text display style as needed ( Including the ciphertext display when entering the password . The text is horizontally centered . Vertically centered up and down . Whether the input text is capitalized . Whether the text is condensed after it is over ...

  3. Xamarin iOS How to use and set the keyboard

    Xamarin iOS How to use and set the keyboard Xamarin iOS Using the keyboard You can see in the text box and text view , When the user touches these views , The keyboard will pop up . This section will mainly explain the definition of keyboard input type . Change the input view when the keyboard is displayed ...

  4. gulp-sass Set different styles of output methods

    sass The final output styles include the following styles : Nested output mode nested Expand output mode expanded  Compact output mode compact  Compression output mode compressed sass: nav { ul { ...

  5. iOS Develop tips --iOS keyboard inputView and inputAccessoryView

    iOS keyboard inputView and inputAccessoryView 1.inputAccessoryView UITextFields and UITextViews There is one inputAccessoryV ...

  6. PHP The team Coding standards & Code style specification

    One . Basic agreement 1. Source file (1). pure PHP Code source files only use <?php label , Omit the close tag ?> : (2). In the source file PHP The encoding format of the code must be none BOM Of UTF-8 Format : (3). Use U ...

  7. bootstrap Predefined styles

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  8. Zhang is very happy Xamarin.Forms Development Notes : by Android And iOS introduce UWP Hamburger style menu ( MasterDetailPage )

    So-called UWP Hamburger menu in style , I was there " Zhang is very happy UWP Development Notes : Hamburger menu advanced " Once said , That is to use Segoe MDL2 Assets Font as left Icon, And the left side uses the fill color ...

  9. IOS Keyboard display and close

    In every one of them IOS Application , It's almost inevitable to do text entry , For example, ask users to fill in login registration information , Comment on the topic , wait . The text input components used are UITextField,UITextView, For the related genera of these two components ...

Random recommendation

  1. Learn how to use notepad++

    Official website address :https://notepad-plus-plus.org/ Font size change :ctrl+ Mouse wheel The theme : Set up - Language formatting , recommend Obsidian perhaps Zenburn The theme , recommend Consolas 1 ...

  2. jQuery example

    1.$("ul li").fliter(":contains(' Canon '),:contains(' nikon '),:contains(' OLYMPUS ')").addClas ...

  3. Cancel svn relation

    Save the following text as a reg file Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\sh ...

  4. Java in String Common methods

    java in String The common method of 1.length() Length of string example :char chars[]={'a','b'.'c'}; String s=new String(chars); int len ...

  5. Python- Function summary

    The source of the original text is , If there is any infringement , Please contact to delete . User customization .py file If you have my_abs() The function definition of is saved as abstest.py The file , that , Can be started in the current directory of the file Python Interpreter , use from abs ...

  6. #2019-2020-4 《Java Programming 》 Week 8 summary

    2019-2020-4 <Java Programming > Week 8 knowledge summary The first 15 Chapter : Generics and collection frameworks One . Generic 1. Generic (Generics) It is possible to build a collection framework with type safety , Like the list . Hash mapping and other data structures : ...

  7. DTCC2019 The 10th China database technology conference will be held in 5 It was held in Beijing in May

    As the top data technology event in China ,10 Over the years ,DTCC Witness the rapid development of domestic database technology , Various distributed databases .NoSQL.NewSQL Technology has sprung up , And Oracle.DB2 And so on , There is even a great potential to surpass . In this context ...

  8. [ turn ]Spring MVC course , Quick start , In depth analysis

    Original address :http://elf8848.iteye.com/blog/875830 Catalog One . Preface Two .spring mvc Core classes and interfaces 3、 ... and .spring mvc  Core flow chart Four .spring mv ...

  9. 6/5 sprint2 Kanban and burn out chart update

  10. ubuntu workbench

    Install the environment first sudo apt-get install python-paramikosudo apt-get install python-pysqlite2 Of course mysql It's got to be installed Still need to install sudo ...