画面上の任意の場所に触れると touchesBegan イベントがトリガーされます。しかし、UIImageView のように特定のオブジェクトに触れた場合、どうすれば管理できませんでしたか?
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView: touch.view];
imageView.center = location;
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[self touchesBegan:touches withEvent:event];
}