I’m trying to center a UIImageView inside the big self.view and using:
CGPoint point;
point.x = self.view.center.x;
works fine and it’s aligned horizontally.
However,
self.view.center.y;
has a value of 250 for the iPhone simulator, when the image is visually in the center when
self.view.center.y = 230
not 250.
How come the center value for the view is off?
Edit:
I should also mention that I’ve tried setting the frame but I get the same problem. The center of my image view ends up being 250 not 230 which visually is still off.
The status bar is 20 points high, if you want your image in the center of device screen you will need to adjust for that.
self.view.centergives you the center of visible portion of your app’s view.