どの画像が最初にタップされたかを検出するようにコーディングするにはどうすればよいですか? つまり、どちらかがタップされ、もう一方がすでに非表示になっている場合、別のサウンドを再生したいのですか?? 何か案は?
- (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];
}
}