YU No
YU No

Reputation: 99

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.

Upvotes: 1

Views: 432

Answers (4)

YU No
YU No

Reputation: 99

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!

Upvotes: 1

Ketan Parmar
Ketan Parmar

Reputation: 27438

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

enter image description here

make sure that you checked editable under behavior

Upvotes: 0

Shuvo Joseph
Shuvo Joseph

Reputation: 912

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

Upvotes: 0

Daniel Storm
Daniel Storm

Reputation: 18878

Make sure both Editable and Selectable are enabled:

enter image description here

You can achieve this programmatically also:

myTextView.editable = true
myTextView.selectable = true

UITextView Class Reference

Upvotes: 0

Related Questions