0

Im not too used to cocoa yet, so please bear with me

I am writing a game for mac in Objective-C on cocoa, and I have one problem:

I have two NSImageViews, and i need to set it up so that if I move one, the other one follows it ON THE Y AXIS ONLY. How do I find out the coordinates of the first image so that i can apply the x value to the second one?

Any help is greatly appreciated

Conor Taylor
  • 2,998
  • 7
  • 37
  • 69

1 Answers1

0

I'm not sure if this works with NSImageView, but it works with UIImageView.

yourImage.frame.origin.x;

I hope that helps

marimaf
  • 5,382
  • 3
  • 50
  • 68