我是手势识别器的新手,所以这个问题可能听起来很傻:我正在将点击手势识别器分配给一组UIView.在这个方法中,是否有可能找出它们中的哪一个是以某种方式被点击的,或者我需要使用屏幕上被点击的点来找出它?
for (NSUInteger i=0; i<42; i++) {
float xMultiplier=(i)%6;
float yMultiplier= (i)/6;
float xPos=xMultiplier*imageWidth;
float yPos=1+UA_TOP_WHITE+UA_TOP_BAR_HEIGHT+yMultiplier*imageHeight;
UIView *greyRect=[[UIView alloc]initWithFrame:CGRectMake(xPos, yPos, imageWidth, imageHeight)];
[greyRect setBackgroundColor:UA_NAV_CTRL_COLOR];
greyRect.layer.borderColor=[UA_NAV_BAR_COLOR CGColor];
greyRect.layer.borderWidth=1.0f;
greyRect.userInteractionEnabled=YES;
[greyGridArray addObject:greyRect];
[self.view addSubview:greyRect];
NSLog(@"greyGrid: %i: %@", i, greyRect);
//make them touchable
UITapGestureRecognizer *letterTapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(highlightLetter)];
letterTapRecognizer.numberOfTapsRequired = 1;
[greyRect addGestureRecognizer:letterTapRecognizer];
}