0
我在特定的視圖中需要GMSMapView。這裏viewForGMSMapView是我的UIView。我使用了下面的代碼。GMSMapView中的AutoLayout
let camera = GMSCameraPosition.cameraWithLatitude(-33.86, longitude: 151.20, zoom: 6.0)
let mapView = GMSMapView.mapWithFrame(viewForGMSMapView.bounds, camera: camera)
mapView.translatesAutoresizingMaskIntoConstraints = true;
mapView.myLocationEnabled = true
viewForGMSMapView.addSubview(mapView)
它有助於解決我的看法。但是,當設備屏幕增加時,它會失敗。如何自動佈局這個GMSMapView。我需要它適合我的視圖