Does the system detect a difference between the keyboard done key and the keyboard minimize button for “Editing Did End”?
I’ve noticed that when I press the “minimize keyboard” button (bottom right) the code for editing did end still runs.
What’s the proper way to distinguish between the “minimize keyboard” button and the “Done” button? Do I need to utilize code on the delegate? How can I get started?
I assume you’re using a
UITextField. You need to assign a delegate to the text field. The “Done“ key sends thetextFieldShouldReturn:message to its delegate. The “dismiss keyboard“ key doesn’t.If you’re using a
UITextView, the “Done” key sendstextView:shouldChangeTextInRange:replacementText:and you have to check for a newline ('\n') in the replacement text.