In development often encounter input text content, when the input is finished, how to let the keyboard disappear, there are some ways to change the keyboard keys, there are other places to click on the screen to let the keyboard disappear, the individual is more inclined to the second kind, click on the screen other places to let the keyboard disappear, to achieve this method is actually very simple, Adds a click gesture to the view of the current controller, which allows a specific textfiled to cancel the first response when the gesture is triggered, i.e.
[Textfiled Resignfirstresponder];
The same is true for a lot of controls, and the better thing is to have all the controls on the view end up editing so that the keyboard disappears. The corresponding code is
[Self.view Endediting:yes];
In this case there will be no keyboard, two cases of flexible use can be.
This article is from the "Red Corner Antelope" blog, please be sure to keep this source http://2254359459.blog.51cto.com/10776102/1881179
iOS makes the keyboard disappear, cancels the first response, cancels a level response