-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[iOS] No identifier for annotation #3036
Comments
There’s no such thing as an “annotation identifier”. (There is a reuse identifier for annotation images, but your application can give a single annotation different images at different times.) Instead, your view controller should store a reference to the annotation you want to identify, then check whether the
This is being tracked in #2211.
If the right callout accessory view is a descendant of UIControl, such as a UIButton, your map view delegate can implement |
|
In general, if you need to manage a few annotations after adding them to the map view, your view controller should store that annotation in an instance variable. However, in your case, it sounds like the image would be considered part of the data for an annotation, rather than mere decoration. So instead of adding a series of
In other words,
Correct. We’re planning to implement it for #320.
I hope this helps! |
Subclassing is good solution, thank you! And thank you for |
I have many annotations, i need to present unique callout but in leftCalloutAccessoryView and rightCalloutAccessoryViewForAnnotation i can't identify annotation, only by title or subtitle, but what if i have the same titles or subtitles, it's not very good. Please add some property to store annotation identifier.
And it's will be very great if i can show custom callout view, not only left or right part but whole view. For example i need to press on callout and present another viewController, but i can't do these now. I can't add button to rightCalloutAccessoryViewForAnnotation but i can't execute button selector.
Thank you.
The text was updated successfully, but these errors were encountered: