如果启用了编辑模式,如何禁用textview的uikeyboard [英] how to disable uikeyboard of textview ,if the editing mode enabled

查看:142
本文介绍了如果启用了编辑模式,如何禁用textview的uikeyboard的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果启用了文本视图编辑,如何隐藏/禁用键盘.

How to hide/disable keyboard ,if the textview editing is enabled.

我只希望该用户只能选择文本,而不能输入文本.

I only want to that user can only be able to select the text and can't be allowed for entering text.

因为选定的文本将转换为图像以进行移动动画.

Because selected text will be converted in to image for move animation.

不允许用户在textview中输入任何文本,这就是为什么应该隐藏或禁用键盘的原因,只允许用户选择文本.

User will not be allowed for entering any text in textview so that's why keyboard should be hidden or disable ,he will be allowed only for text selection.

推荐答案

uitextview.editable = NO;或在IB中设置选中标记.它将允许选择带有选项的文本-复制和全选,而不会出现键盘.点击单词并按住以选择文本.

uitextview.editable = NO; or set checkmark in IB. It will allow to select text with options - Copy and Select All without keyboard appearing. Tap on the word and hold to select text.

这篇关于如果启用了编辑模式,如何禁用textview的uikeyboard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆