- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:YES];
self.mapView.frame = self.view.bounds;
self.mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
CLLocationCoordinate2D startCoord = CLLocationCoordinate2DMake(36.7472, -95.9594);
MKCoordinateRegion adjustedRegion = [self.mapView regionThatFits:MKCoordinateRegionMakeWithDistance(startCoord, 10000*1609.344, 10000*1609.344)];
[self.mapView setRegion:adjustedRegion animated:YES];
}
それが私が今持っているコードです。iPad の向きを横から縦に変更しても、マップ ビューのサイズは変わりません。ビュー全体を埋めたいと思います。解決策をグーグルとスタックオーバーフローで検索してみましたが、うまくいきませんでした。
どんな助けでも大歓迎です。