iPad Image拖动无法正常工作

时间:2013-02-17 00:56:18

标签: ios ipad touchesmoved

我是iOS的初学者(也是stackoverflow的新手!)我一直在尝试在iPad上实现拖动功能。由于我的应用程序将是通用的,我已经使用touchesMoved和touchesEnded方法在iPhone上工作了。我注意到它在iPad上不起作用。我已经检查过以确保我的所有UIImageViews都已正确配置。

所以我的问题是,这个实现是否适用于iPad?如果没有,有没有快速修复?感谢。

-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {

UITouch *touch = [[event allTouches] anyObject];
if ([touch view] == redring) {
    CGPoint location = [touch locationInView:self.view];
    redring.center = location;
}
if ([touch view] == bluering) {
    CGPoint location = [touch locationInView:self.view];
    bluering.center = location;
}

}

0 个答案:

没有答案
相关问题