2

I have two points (x1, y1) A & (x2, y2) B.

I want to animate an image from point A to point B but also have a touch event on that image. What is the best way to accomplish this?

I am currently using CGPointMake to manually plot points but I want to be able to just plug in the two coordinates and have a timer loop to move the object.

I have this so far but it doesn't seem to work.

CGFloat xStep = x1;

xStep++;

CGFloat yStep = (((y2-y1)/(x2-x1))*xStep)+(((y2-y1)/(x2-x1))*x1);

ceuyan
  • 21
  • 1

1 Answers1

1

i think you're going about it too low level. what about doing things like:

How does [UIView beginAnimations] work?

Community
  • 1
  • 1
Shai UI
  • 50,568
  • 73
  • 204
  • 309