Touch 可以指定 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];
}
我可以以“self”所在的不同 UIview 的名义吗?