XCode 6.3 MKPointAnnotation setCoordinate missing

前端 未结 1 1266
悲&欢浪女
悲&欢浪女 2020-12-31 03:24

I just updated XCode to 6.3 and now I am receiving the below error: MKPointAnnotation does not have a member named \'setCoordinate\'.

Not sure where it went, or if w

1条回答
  •  -上瘾入骨i
    2020-12-31 04:15

    As stated in the iOS 8.3 API Diffs in the MapKit module, the setCoordinate method was removed:

    Removed MKAnnotation.setCoordinate(CLLocationCoordinate2D)


    Fortunately, you must now use the simpler assignment syntax (which was already available in previous versions of Swift and the same could be done in Objective-C):

    annotation.coordinate = location
    

    0 讨论(0)
提交回复
热议问题