2011-07-28 107 views

回答

4

您可以使用:

UITapGestureRecognizer *tgr = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(anyMethod)]; 
[imageView addGestureRecognizer:tgr]; 
[tgr release]; 

之前这样做,使的UIImageView的用户交互。

+1

感谢交换...它的工作 – iMincy

+1

交换和iMincy:此功能不适用于版本低于3.2的iOS。因为在早期版本中,UITapGestureRecognizer库不在那里。 – Mrunal