【发布时间】:2018-11-17 11:24:37
【问题描述】:
我创建了一个 UIView,我想将谷歌地图放入其中。但是,当我将 GMSMapview 添加到我的 UIView 时,GMSMapview 的底部不会扩展以适应 UIView。我仍然可以看到 UIVIew 的灰色部分。
这是为什么呢?
- (void)viewDidLoad
{
// Create a GMSCameraPosition that tells the map to display the
// coordinate -33.86,151.20 at zoom level 6.
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.868
longitude:151.2086
zoom:6];
GMSMapView *mapView = [GMSMapView mapWithFrame:self.googleMapView.bounds camera:camera];
[self.googleMapView addSubview:mapView];
}
【问题讨论】:
标签: ios objective-c xcode google-maps