1
我该如何对其进行编码,以便它能够检测到哪个图像被首先点击?换句话说,如果其中一个被挖掘,但另一个已经隐藏起来,我想让它发挥不同的声音?有任何想法吗?touchesBegan在iPhone SDK中的问题?
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
NSLog(@"tag %@",touch);
if([touch view] == test) {
test.hidden=YES;
[self playpopsound];
}
else if([touch view] == test2){
test2.hidden=YES;
[self playpopsound];
}
}