我在同一个视图中有两个 UIImageView,我想分别移动它们。当我移动第一个时,第二个应该保持固定,反之亦然。
- (void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:[self view]];
[imageView1 setCenter:location];
[imageView2 setCenter:location];
}