如何为 UITextView 启用滑动手势识别?
这是我的代码,附加到它的事件没有触发。它适用于水龙头,但不适用于滑动。
// Add swipe support for easy textview content clean up
UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(eraseTextWithSwipe:)];
[targetContent addGestureRecognizer:swipe];
[swipe release];
我怎么做?