如何在Swift中了解TapGesture Recgoinizer的容器

时间:2015-04-08 15:51:38

标签: swift uiview uitapgesturerecognizer

我想知道Swift中UITapGestureRecognizer的容器

例如,如果我在UITapGestureRecognizer

中添加View1

触发UITapGestureRecognizer操作时,我怎么知道View1UITapGestureRecognizer的容器?

1 个答案:

答案 0 :(得分:0)

在您为UITapGestureRecognizer致电所传递的选择器内,sender将是gestureRecognizersender.view将成为UITapGestureRecognizer的视图附于。