Question

I'm trying to make my image view that i put in Xcode right at 0, 0 top right corner with 320 460 so it spans over entire screen, in the size inspector i made sure to have the origin with the red arrows right at the top left so its the right coordinate thing, but for some reason when i put the image view in the exact center its telling me that the center is 20x 160 y why is it doing this, when i click on my view its saying the center is 0x 0y the way is supposed to be, this is making me mad

Was it helpful?

Solution

Im not sure what you mean by "when i put the image view in the exact center", but regardless if you use the size inspector, and set the origin to (0,0) with a size of (320,460), it will span the entire view.

Beyond that, the view you are loading the image view into needs to be origined at (0,0) and with a size of (320,460).

It sounds like the views you are putting the image view into are not positioned correctly, as the coordinate system is in relation to the parent view.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top