Reputation: 22305
I've put an MKMapView
in a view at certain x-y coordinates (x:25 y:120) at a size that's about a third of the view tall and fills much of the width (w:275, h:150). There are other elements in the view, mostly labels and buttons.
When looking at it after having it appear [edited to add: while running the app in the simulator] (pushed onto a UINavigationController
stack, a detail view of a table cell) everything on the page is in its appropriate place EXCEPT for the MKMapView
, which is always its height further up on the page. That is, in the case of the measurements shown above it actually puts it at x:25 y:-30. If I move it further down the page, say y:300, it still moves it up the height of the map, in this case to y:150.
Why does it keep moving? It's a terrible hack to initially position it 150 pixels farther down the view in order to have it end up at the right place.
Upvotes: 2
Views: 459
Reputation: 22305
The autosizing options needed to be set such that the top, bottom, left, right, and height were all solid (unchangeable). This may have been related to it being in a scrollview, though I'm not sure.
Upvotes: 3