ios – Swift错误 – 使用未解析的标识符’kGMSMarkerAnimationPop’

ios – Swift错误 – 使用未解析的标识符’kGMSMarkerAnimationPop’,第1张

概述我收到了这个错误 use of unresolved identifier ‘kGMSMarkerAnimationPop’ 当我在Swift 3中使用以下代码时: let camera = GMSCameraPosition.camera(withLatitude: location.coordinate.latitude, longitude: location.coordinate.long 我收到了这个错误

use of unresolved IDentifIEr ‘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 = truemapVIEw?.settings.myLocationbutton = truevIEw = mapVIEwlet 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 linemarker.map = mapVIEwlocationManager.stopUpdatingLocation()@H_403_20@  

我该如何解决?

解决方法 在Swift 3/4和GoogleMaps 2.3.0中.
新语法是:

marker.appearanimation = GMSMarkerAnimation.pop@H_403_20@  

Ambiguous use of ‘kGMSMarkerAnimationPop’ Error in Swift 2

总结

以上是内存溢出为你收集整理的ios – Swift错误 – 使用未解析标识符’kGMSMarkerAnimationPop’全部内容,希望文章能够帮你解决ios – Swift错误 – 使用未解析的标识符’kGMSMarkerAnimationPop’所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1075301.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存