久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

iPhone - UITextView 的問題

iPhone - Problem with UITextView(iPhone - UITextView 的問題)
本文介紹了iPhone - UITextView 的問題的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

這可能是一件容易的事,但我就是想不通——如何結束編輯文本視圖?如何讓鍵盤消失?還是我必須在它外面點擊才能讓它消失?

This is probably an easy thing to do, but I just can't figure it out - how do I end editing athe textview? how can I get the keyboard to disappear? or do I have to click outside it to make it go away?

推薦答案

首先,像這樣一個(說實話)相當簡單的問題讓我想知道您是否嘗試過閱讀文檔或在互聯網上搜索.

First, a (to be honest) fairly simple question like this makes me wonder if you've tried reading the documentation, or searching on the internet.

搜索Apple 文檔 UITextView"為您提供 此鏈接 到類文檔.同樣,這里是文檔UITextViewDelegate.

Searching for "Apple documentation UITextView" gives you this link to the class documentation. Similarly, here is the documentation for the UITextViewDelegate.

搜索UITextView 簡單示例"會為您提供這個有用示例.

Searching for "UITextView simple example" gives you this useful example.

搜索UITextView 關閉鍵盤",第一個點擊似乎是 準確回答您的問題.(盡管他在返回鍵上關閉了鍵盤,這可能不是您想要的.)(編輯 - 從您的第二條評論看來,這正是您想要的.)

Searching for "UITextView dismiss keyboard", the first hit seems to answer your question exactly. (Although he dismisses the keyboard on a return key, which may not be what you want.) (Edit - it seems from your second comment it's exactly what you want.)

附:上面的人是正確的,如果有點簡潔(可以理解).你需要實現一個 UITextViewDelegate.在該委托中,如果您想在返回鍵上隱藏鍵盤,請實現 shouldChangeTextInRange,查找 @" " 并在收到第一響應者時辭職.或者,在您的 UI 中添加完成編輯"按鈕,并在用戶按下它時退出第一響應者.

P.S. The people above are correct, if a little terse (understandably). You need to implement a UITextViewDelegate. In that delegate, if you want to hide the keyboard on a return key, implement shouldChangeTextInRange, look for a @" " and resign first responder if you get it. Alternatively, add a "Done editing" button to your UI, and resign first responder if the user presses it.

這篇關于iPhone - UITextView 的問題的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Find the CGPoint on a UIView rectangle intersected by a straight line at a given angle from the center point(在與中心點成給定角度的直線相交的 UIView 矩形上找到 CGPoint)
Is it possible to reference a variable with a string and an int?(是否可以使用字符串和 int 引用變量?)
Is there a native YAML library for iPhone?(是否有適用于 iPhone 的本機 YAML 庫?)
View aligned to top of keyboard appears in wrong place in iOS 9 Shortcut Bar only mode(在 iOS 9 Shortcut Bar only 模式下,與鍵盤頂部對齊的視圖出現在錯誤的位置)
Disable speech to text button (Micro phone) on soft input keyboard in android programmatically(以編程方式在android中的軟輸入鍵盤上禁用語音到文本按鈕(麥克風))
UIkeyboard type(UI鍵盤類型)
主站蜘蛛池模板: 免费一级黄色 | 色播99| 亚洲一区二区三区免费在线观看 | 黄色免费在线观看 | 亚洲天堂999 | 国产真实乱全部视频 | 一区二区三区视频在线观看 | 国产一区二区三区免费视频 | 久久久久国产一区二区三区四区 | 国产精久久久久久久妇剪断 | 国产精品视频网址 | 日日操夜夜操天天操 | 中文字幕高清免费日韩视频在线 | 亚洲国产精品99久久久久久久久 | 夜夜摸夜夜操 | 成年无码av片在线 | 在线一区二区三区 | 一区二区日韩 | 激情五月婷婷综合 | 国产av毛片 | 91精品一区二区三区久久久久久 | 午夜影院网站 | 欧美视频一区二区三区 | 丝袜 亚洲 欧美 日韩 综合 | 一区在线免费视频 | 亚洲视频 欧美视频 | 欧美在线视频不卡 | 尤物在线 | 亚洲国产精品一区二区久久 | 亚洲码欧美码一区二区三区 | 国产精品亚洲一区二区三区在线 | 亚洲精品二区 | 国产欧美一区二区三区日本久久久 | 在线观看免费高清av | 色视频www在线播放国产人成 | 亚洲视频在线播放 | 亚洲va欧美va天堂v国产综合 | 中文字幕在线一区 | 青草久久免费视频 | 久久99精品久久久97夜夜嗨 | 99亚洲精品|