当前位置: 动力学知识库 > 问答 > 编程问答 >

ios - UITextView does not detect touch input

问题描述:

I have an app with a tab bar with several tabs. I inserted a new tab with a simpleUITextView. However, the text view does not seem to respond to touch inputs and I am not able to edit it. It just stays static with the default text and does nothing.

网友答案:

Nevermind. It was an issue with a class returning "NO" to canBecomeFirstResponder method. What a nightmare that took me hours to realize! Anyway, thanks everybody for your time and help and so sorry for posting such a stupid problem!

网友答案:

Make sure both Editable and Selectable are enabled:

You can achieve this programmatically also:

myTextView.editable = true
myTextView.selectable = true

UITextView Class Reference

网友答案:

From the Attributes inspector make sure that User Interaction Enable is checked.

网友答案:

Select your text view and from attribute inspector make sure that userinteraction is enable and check other options also as screenshot.

make sure that you checked editable under behavior

分享给朋友:
您可能感兴趣的文章:
随机阅读: