タッチはそれ自体の座標系でタッチ位置を取得するために self を指定できますが、別の座標系から取得するにはどうすればよいですか? 別の UIview の座標系を教えてください。
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[UIView beginAnimations:@"box" context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationBeginsFromCurrentState:YES];
UITouch *touch = [touches anyObject];
box.center = [touch locationInView:self];
[UIView commitAnimations];
}
「自己」がある別の UIview の名前でできますか?