Make UITextView in response to event event. (Iphone)

I am trying to implement a scrollable text view (not editable) that displays some help information etc. and when the user does all they have to do is click on it and it will disappear / hide and the user will be returned to the home screen ...

UITextview doesn't respond to a tap event (or I'm not sure how to get it to respond to a tap event). Any ideas how to implement this?

I also tried to put it in a transparent button so that I can grab the tap, but then I cannot scroll the text view as it looks like a button.

I am new to iphone, any help ... gr8

thank

+3


source to share


1 answer


How do I add adding a gesture recognizer to a text view?



UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(textViewTapped:)];
[yourTextView addGestureRecognizer:gestureRecognizer];

      

+12


source







All Articles