IOS development 3: attributes of the uitextfield Control

Source: Internet
Author: User

Drag a text box to the view using IB in xcode 4.2, select the text box, and set its attributes in attribute inspector.

Attribute inspector is divided into three parts: text field, control, and view. Let's focus on the text field section.

Text Field has the following options:

1. Text: Set the default text of the text box.

2. placeholder: displays the gray text box, prompting you what to enter in this text box. When data is entered in this text box, the gray words used for the prompt will automatically disappear.

3. Background:

4. Disabled: If this option is selected, you cannot change the text box.

5. Next, there are three buttons for setting alignment.

6. Border style: select the border style.

7. Clear button: this is a drop-down menu. You can select when the Clear button appears. The clear button is a small X on the right of the text box. You can select the following options:

7.1 never appears: never appears

7.2 appears while editing: displayed during editing

7.3 appears unless Editing:

7.4 is always visible: always visible

8. Clear when editing begins: If this option is selected, the previous content in the text box will be cleared when you start to edit the text box. For example, if you enter "what" in text box A, then edit text box B. If you come back to edit text box a, "what" is immediately cleared.

9. text color: Set the text color in the text box.

10. Font: Set the font and font size of the text.

11. Min font size: Set the smallest font that can be displayed in the text box (but I feel useless)

12. Adjust to fit: Specifies whether to reduce the size of the text box by an hour. Select it to make all the text visible, even if the text is too long. However, this option should be used with Min font size, and the text will be reduced, and it will not be smaller than the set min font size.

The following section is used to set how the keyboard is displayed.

13. captitalization: Set to uppercase. The drop-down menu has four options:

13.1 none: Do not set upper case

13.2 words: the first letter of each word is capitalized. The words here refer to strings separated by spaces.

13.3 sentances: the first letter of each sentence in uppercase. The sentence here is a string separated by periods and spaces.

13.4 All characters: uppercase letters

14. Correction: check spelling. The default value is yes.

15. keyboard: select the keyboard type, such as full numbers, letters, and numbers.

16. Appearance:

17. Return key: select the return key. You can select search, return, and done.

18. Auto-enable return key: If this option is selected, the Return key is valid only when at least one character is entered in the text box.

19. Secure: when your text box is used as the password input box, you can select this option. The character is displayed as an asterisk.

Related Article

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.