Quote:
Originally Posted by harrytheshark
Well, look up CGPoint, to see how you can get x values and y values for the touch. Then look up whatever your object is to see how you can get x values and y values for that.
Then use some simple if statements to compare them.
|
Code:
image.center = CGPointMake(image.center.x+pos.x, image.center.y+pos.y);
if (image.center.x > 295 || image.center.x < 25)
pos.x = -pos.x;
if (image.center.y > 375 || image.center.y < 30)
pos.y = -pos.y;
is this what you mean.