IOS keyboard Hiding Methods: ios keyboard Hiding Methods

Source: Internet
Author: User

IOS keyboard Hiding Methods: ios keyboard Hiding Methods

In ios development, you often need to enter information. There are two input methods: UITextField and UITextView. After entering the information, you need to hide the keyboard. The following describes how to hide the keyboard.

<1> click the return button on the keyboard to hide the keyboard.

1. UITextField

Compliance Agreement

 

Set proxy

 

Using proxy

2. UITextView

Compliance Agreement

 

Set proxy

 

Using proxy

<2> Add a button on the keyboard and click the button to hide the keyboard.

Set button

1. UITextField

2. UITextView

 

Add a hidden keyboard

 

<3> click a blank position other than the keyboard to hide the keyboard.

In the touchesBegan: withEvent: method, let the input control discard the first responder identity

 

<4> Add a gesture and click a blank position other than the keyboard to hide the keyboard.

 

<5> you only need to click the blank interface except the keyboard. No matter which control is clicked, the keyboard is hidden.

 

 

Author: Jerry Education
Source: http://www.cnblogs.com/jerehedu/
The copyright of this article belongs to Yantai Jerry Education Technology Co., Ltd. and the blog Park. You are welcome to repost it. However, you must keep this statement without the author's consent and provide the original article connection on the article page, otherwise, you are entitled to pursue legal liability.

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.