0

I had the pulsating dot of the MKUserLocation in my App. Now with the new Xcode 6.3 the MapKit changed so the following code is not working anymore.

var anno = MKUserLocation()
anno.coordinate = locationNew

as well the setCoordinate() method is removed from the MapKit.

Has someone an idea how to get the pulsating dot to a custom location in MapView?

Bhavin Bhadani
  • 22,224
  • 10
  • 78
  • 108
Ti Low
  • 1
  • there is no coordinate property in MKUserLocation class. https://developer.apple.com/library/mac/documentation/MapKit/Reference/MKUserLocation_Class/index.html#//apple_ref/doc/uid/TP40008424-CH1-SW2 – Yogesh Suthar May 07 '15 at 09:48
  • 1
    Why so you want to set the user location? The location of the user can't be updated by yourself. – Christian May 07 '15 at 09:56
  • See http://stackoverflow.com/questions/29548143/xcode-6-3-mkpointannotation-setcoordinate-missing. However, you still cannot set the coordinate on an MKUserLocation because it is the default read-only like the MKAnnotation protocol says. Other classes such as MKPointAnnotation override coordinate as read-write. –  May 07 '15 at 11:07
  • @YogeshSuthar: MKUserLocation _does_ have a coordinate property (an annotation by definition _must_ have a coordinate property). This isn't obvious from that doc link but note that it conforms to the `MKAnnotation` protocol in which coordinate is a required property. –  May 07 '15 at 11:11
  • In an earlier release it was possible to instanciate an MKUserLocation and manipulate the coordinates to generate a pulsating dot on a MapView at a custom location. Is there another workaround for this? – Ti Low May 08 '15 at 14:53

0 Answers0