0

enter image description here

So I saw this picture on a previous post about bounds and frame. My question is when you change the origin (x and y point) of the frame, does that mean you are changing the origin of that view in the parent view? And if that is true, are you moving the actual image to the new origin because the bound origin is still (0,0) and and the image didn't move to the (20,52) origin and is still present at (0,0)?

1 Answers1

0

The bounds's origin is always to be (0, 0). It expresses a view rectangle in its own coordinate system.

And,

Frame => A view's frame (CGRect) is the position of its rectangle in the superview's coordinate system. By default it starts at the top left.

Community
  • 1
  • 1
AechoLiu
  • 17,522
  • 9
  • 100
  • 118
  • Ok, so frame and bound just refer to the imaginary rectangle the image is in, not the actual position of the image on the screen? So when the user runs the app, they see the placement of the image based of the frame's origin (x and y point) on their iPhone screen and not based of the bound's origin? –  Aug 03 '15 at 03:42