我在一个视图上有 4 个图像视图。我想让 4 个图像可移动。我使用了触摸移动方法。它似乎适用于我的 3 个图像视图。但是第四个没有移动。在所有情况下都检测到触摸我已通过 NSlog 验证。请帮助。
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:self.view];
if ([touch view] == textstyleImage) {
textstyleImage.center = location;
}
else if ([touch view] == clipartImage){
clipartImage.center = location;
}
else if([touch view] == customMessage){
customMessage.center = location;
}
else if([touch view] == galleryImage){
galleryImage.center = location;
}
}