简体   繁体   English

在ViewController和UITextView上向左/向右滑动事件

[英]Swipe left/right event on ViewController and UITextView over it

I have a ViewController on which there is a UITextView. 我有一个ViewController上有一个UITextView。 On swipe let/right i want to refil UITextView with some other text. 在向左/向右滑动时,我想用其他一些文本重新绘制UITextView。 Touch Events are attached on ViewController. 触摸事件附在ViewController上。 Problem is to pass touch events to ViewController i need to setUserInteractionEnabled to NO. 问题是将触摸事件传递给ViewController,我需要将UserInteractionEnabled设置为NO。 but i set it to No then my UITextView does not scroll content. 但我将其设置为否,那么我的UITextView不会滚动内容。

What shld i do? 我该怎么办?

Check this blog post here : http://mithin.in/2009/08/26/detecting-taps-and-events-on-uiwebview-the-right-way/ 在此处查看此博客文章: http : //mithin.in/2009/08/26/detecting-taps-and-events-on-uiwebview-the-right-way/

It's for UIWebView but should work right for you. 它用于UIWebView,但应该适合您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM