如何启用UITextView的滑动手势识别?如何启用UITextView的滑动手势
这是我的代码,附加到它的事件不会触发。它适用于水龙头,而不是轻扫。
// Add swipe support for easy textview content clean up
UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(eraseTextWithSwipe:)];
[targetContent addGestureRecognizer:swipe];
[swipe release];
我该怎么做?
我不确定这个问题中的任何建议是否有帮助;它没有被接受的答案。 http://stackoverflow.com/questions/2042930/successful-swipe-in-uitextview – Greg 2010-09-13 16:36:58
谢谢你的评论,但不适用,我已经看到它。这使用了苹果在iPhone 4.x中不推荐的技术。 – amok 2010-09-14 14:16:50