rom*_*e 웃 6 google-maps ios swift
我的代码:
var camera = GMSCameraPosition.cameraWithLatitude(currentLocation.latitude, longitude: currentLocation.longitude, zoom: 12)
//latitude, longitude like :31.230416 and 121.473701.
let map = GMSMapView(frame: CGRectZero)
map.delegate = self
map.camera = camera
self.view = map
Run Code Online (Sandbox Code Playgroud)
它工作正常!像这样:
但是当我创建新视图时: @IBOutlet weak var mapView: UIView!
然后改变这一行:self.view = maptoself.mapView = map
它不适合我,我得到一个空白的视图.