【发布时间】:2017-03-28 06:47:56
【问题描述】:
我收到了这个错误
使用未解析的标识符“kGMSMarkerAnimationPop”
当我在 Swift 3 中使用以下代码时:
let camera = GMSCameraPosition.camera(withLatitude: location.coordinate.latitude, longitude: location.coordinate.longitude, zoom: 14)
mapView = GMSMapView.map(withFrame: CGRect.zero, camera: camera)
mapView?.isMyLocationEnabled = true
mapView?.settings.myLocationButton = true
view = mapView
let marker = GMSMarker()
marker.position = CLLocationCoordinate2D(latitude: location.coordinate.latitude, longitude: location.coordinate.longitude)
marker.title = "Sydney"
marker.snippet = "Australia"
marker.appearAnimation = kGMSMarkerAnimationPop // the error is occurring in this line
marker.map = mapView
locationManager.stopUpdatingLocation()
我该如何解决?
【问题讨论】:
-
试试 kGMSMarkerAnimation.Pop
-
@Anbu 当我尝试使用未解析的标识符“kGMSMarkerAnimation”时出现错误
标签: ios google-maps swift3 xcode8 gmsmapview