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.