Skip to content

There is a much simpler alternative #5

Description

@malhal

Seems like you did a ton of work trying to solve this problem however you'll find this simple trick of setting the annotation again will cause it to update to the new coordinate:

MKAnnotationView* annotationView = [self.mapView viewForAnnotation:a];
a.coordinate = newCoordinate;
annotationView.annotation = a;

Furthermore if you want to animate the move just do:

[UIView animateWithDuration:0.5 animations:^{
a.coordinate = coordinate;
annotationView.annotation = a;
}];

FYI I saw you setting a mapView on your HGMovingAnnotationView causing a circular reference, tut tut you should be ashamed ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions