MKMapView not filling view (iOS)
I am creating a view programmatically. The view is fairly simple as it
only contains an MKMapView which I want to fill the screen (with the
exception of the navigation bar at the top).
Here is what I am doing to setup the MKMapView:
- (void)setupMapView
{
mapView = [[MKMapView alloc] initWithFrame:self.view.frame];
mapView.delegate = self;
mapView.autoresizingMask = UIViewAutoresizingFlexibleHeight |
UIViewAutoresizingFlexibleWidth;
[self.view addSubview:mapView];
}
However, the MKMapView doesn't seem to fill the entire screen. If you look
at the top of this screenshot there is a gap between the top of the map
and the bottom of the navigation bar (which is added by the
UINavigationController).
Please could someone suggest why this is happening and how I can fix it?
No comments:
Post a Comment