When you click the Uitextfield input box, the soft keyboard is not automatically hidden after the end of the input, and two ways to automatically hide the soft keyboard are summarized:
The first: by responding to the Do end on Exit event of the Uitextfield object, when clicking the "Done" button on the default soft keyboard or the "Return" button triggers the Do end on Exit event, the code implementation responds to the Do end on Exit event to implement auto-Hide keyboard
-(Ibaction) Textfielddidendonexit: (ID) sender { [TextField resignfirstresponder];}
The second way: The soft keyboard is automatically hidden by touching the background view of the Uitextfield object.
It is important to note that the class of the background view is called the Uicontrol class by UIView classes, because this is the only way to trigger the touch down event when the user clicks the UIView and then define the touch by encoding Down response to achieve the purpose of hiding the soft keyboard.
-(Ibaction) Viewtouchdown: (ID) sender { [TextField resignfirstresponder];}
[Rookie growth Kee]ios develop self-study note 07-uitextfield Auto-Hide keyboard