2012-03-12 47 views
1

在我查看我有一个图像视图。我添加了一个UISwipeGestureRecognicer到这个图像View this.Pad_imgHeader.AddGestureRecognizer(sgrRight);Monotouch UISwipeGestureRecognizer on和UIImageView

在一个正常的查看它的作品。但为什么它不适用于UIImageView?

回答

3

默认情况下,用户交互对于UIImageViews(也是UILabels)是禁用的。因此,UIImageView不响应触摸。 尝试将其设置为true,然后添加手势:

this.Pad_imgHeader.UserInteractionEnabled = true; 
this.Pad_imgHeader.AddGestureRecognizer(sgrRight); 
+0

谢谢:)问题解决了 – Alex 2012-03-12 13:04:25

+0

不客气! – 2012-03-12 19:42:55