【发布时间】:2010-09-13 15:04:00
【问题描述】:
如何为 UITextView 启用滑动手势识别?
这是我的代码,附加到它的事件没有触发。它适用于点击,但不适用于滑动。
// Add swipe support for easy textview content clean up
UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(eraseTextWithSwipe:)];
[targetContent addGestureRecognizer:swipe];
[swipe release];
我该怎么做?
【问题讨论】:
-
我不确定这个问题中的任何建议是否会有所帮助;其中没有公认的答案。 stackoverflow.com/questions/2042930/…
-
感谢您的评论,但这并不适用,我已经看到了。这使用了 Apple 在 iPhone 4.x 中不推荐的技术。
标签: iphone ipad gesture-recognition