Reputation: 1009
There are many questions out there on the "Done" button on the keyboard itself. This question is about the Done button that appears on the bar above the simulator's keyboard for a UITextView. This is a screenshot of my simulator:
You'll notice that above the keyboard, there is that bar with a Done button. If I click that button, the keyboard disappears completely.
I am happy with that behavior which seems to be there automatically. I don't have an iphone - I am testing on a simulator for now. My question is on real devices is that UI and behavior always there or is it just there on my simulator?
Upvotes: 1
Views: 159
Reputation: 11333
You will see the done button automatically without any code if you are using a UIWebView
and textfield is present inside that webview. Is this the case?
Other than that as @pob21 stated, you can never get the inputAccessoryView
without writing it in the code explicitly.
Upvotes: 0
Reputation: 1928
TL;DR: Yes, if it's been explicitly added in code to appear above the keyboard for that particular instance. But that's not by default.
That isn't there by default, that's added using the inputAccessoryView
property of a UITextField
, and UITextView
. We don't get that for free, we have to create it ourselves. But if you're concerned about it being visible on an actual device (on the screen you attached) then the answer is yes. But I don't want you to get the impression that you'll see that done button every time you see a keyboard onscreen.
Hope this helps! Let me know if you have any other questions.
Upvotes: 1