UITextField, uitextfield multiple rows

Source: Internet
Author: User

UITextField, uitextfield multiple rows
UITextFieldDemo

 

Effect

 

Features

1. Effectively customize the keyboard Style

2. Handle text box occlusion by keyboard

 

Usage

1. Import the file (UITextField + CreateInputAccessoryView. h/. m). There is only one method that is more practical.

2. Import (UIView + SetRect. h/. m) This file better handles the location of the control

 

Source code

Github: https://github.com/makingitbest/TextFieldDemo

 

Details

1. There is no internal processing method, which can be used directly to customize inputViewAccessoryView.

 

2. An internal encapsulation method. Only one height can be passed on the outside, and any controls and the like need to be implemented internally

 

3. This block method is used to store inputAccessoryView and customize the keyboard according to local conditions.

 

4. This block is versatile, and the click events in it have been passed out. It can handle keyboard recycling and customize its own keyboard.

 

5. Actually, you can delete the two methods, mainly using the method in detail 4.

 

6. Main Internal encapsulation methods

 

7. Related Processing Methods for the UITextFieldDelegate proxy

 

8. The method to be processed is not highlighted in red.

(1) process text box offset

 

(2) restore the text box to its original position.

 

(3) control the length of text box content Input

 

(4) Press return to reclaim the keyboard

 

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.