UITapGestureRecognizer initWithTarget:action: method to take arguments?

后端 未结 2 970
太阳男子
太阳男子 2021-02-04 11:32

I\'m using UITapGestureRecognizer because I\'m using a UIScrollView that acts as a container for my UILabels. Basically I\'m trying to use

2条回答
  •  伪装坚强ぢ
    2021-02-04 12:03

    You can use just one UITapGestureRecognizer and in your gesture handler (your myLaberXTap), which has the syntax:

     - (void)handleGesture:(UITapGestureRecognizer*)gestureRecognizer {
         ...
     } 
    

    use gesture.view to know which view you are working on.

提交回复
热议问题