0

According to this documentation https://developer.apple.com/documentation/mapkit/mkannotationview/1452401-isdraggable if I set an annotation as draggable, I must also implement setCoordinate.

According to this documentation, https://developer.apple.com/documentation/mapkit/mkannotation/1429528-setcoordinate if I implement setCoordinate I must do so in a key-value observing compliant way.

Have any of you experience with this? Would you show me how this is done? How do you make setCoordinate key-value observing compliant? I'm using Swift for iOS.

daniel
  • 1,446
  • 3
  • 29
  • 65
  • 1
    Possible duplicate of [Drag an annotation pin on a mapview](https://stackoverflow.com/questions/10733564/drag-an-annotation-pin-on-a-mapview) – RLoniello Jan 02 '18 at 00:29

1 Answers1

0

I found out from https://forums.developer.apple.com/message/286897?et=watches.email.thread#286897 that I can add the @objc keyword to the class declaration and add @objc and "dynamic" to property "coordinate" and my Swift code becomes key-value observing compliant.

daniel
  • 1,446
  • 3
  • 29
  • 65