开发者

iPhone UITextView Did End On Exit properties?

开发者 https://www.devze.com 2023-01-12 11:09 出处:网络
Why is it that the开发者_Python百科re is no Did End On Exit property for a UITextView?How do you resignFirstResponder to lower the keyboard when the user clicks the \'Done\' button?A UITextField usual

Why is it that the开发者_Python百科re is no Did End On Exit property for a UITextView? How do you resignFirstResponder to lower the keyboard when the user clicks the 'Done' button? A UITextField usually works by just linking 'Did End On Exit' from UIBuilder but UITextView doesn't have that option.


Most apps solve this problem by adding a button somewhere in your UI. For instance in Safari, when you pop up the Keyboard on a UITextView, it brings a Toolbar with it with Previous, Next, autofill and a Done Button, and the Done button implements [myTextView resignFirstResponder];


There is textViewDidEndEditing: in the UITextViewDelegate protocol that will do what you need I believe.

0

精彩评论

暂无评论...
验证码 换一张
取 消