草庐IT

taggesture

全部标签

ios - Objective-C:将字符串参数传递给 taggesture @selector

我想要实现的是:当我点击一个特定的UIImageView时,UITapGesture会将一个字符串传递给tap方法。我的代码如下:假设我已经有一个UIImageView对象,当我点击这个图像时,它会调用电话,UITapGestureRecognizer*tapFirstGuy=[[UITapGestureRecognizeralloc]initWithTarget:selfaction:@selector(makeCallToThisPerson:@"1234567")];[imageViewOneaddGestureRecognizer:tapFirstGuy];-(void)mak