[UITapGestureRecognizer tag]: unrecognized selector sent to instance

前端 未结 5 1438
一个人的身影
一个人的身影 2020-12-16 00:44

I am having a series of imageview arranged, and assigning a TapView recognizer to it

UITapGestureRecognizer *tapRecognizer = [[UITa         


        
5条回答
  •  旧巷少年郎
    2020-12-16 01:14

    You cannot get tag property of UITapGestureRecognizer rather you have to get of its view's property,

    You can try,

    -(void)action:(id)sender
      {
         NSLog(@"TESTING TAP");
         NSLog (@"%d",[[sender view]tag]);
    
      }
    

提交回复
热议问题