i am trying to have a drop area of an item and when the item drops on the wrong area it will go back to its original position.
我的守则如下:
UITouch *touch =[[event allTouches] anyObject];
CGPoint dropPoint = CGPointMake(60, 520);
location = [touch locationInView:self.view];
if([touch view]==image1 && CGPointEqualToPoint(location, dropPoint)){
[image1 setFrame:CGRectMake(60, 520, 150, 184)];
return;
} else
{
[dad setFrame:CGRectMake(530, 225, 150, 184)];
}
i 我认为,我的错误是,如果指挥指挥,在指挥之前必须确切地表明这一点,即点点上的位置是正确的吗?
现在我不知道如何确定......
事先得到帮助!