dequeueReusableAnnotationImageWithIdentifier method
Returns a reusable annotation image object associated with its identifier.
For performance reasons, you should generally reuse MLNAnnotationImage
objects for identical-looking annotations in your map views. Dequeueing
saves time and memory during performance-critical operations such as
scrolling.
@param identifier A string identifying the annotation image to be reused.
This string is the same one you specify when initially returning the
annotation image object using the -mapView:imageForAnnotation: method.
@return An annotation image object with the given identifier, or nil if no
such object exists in the reuse queue.
Related examples
- TODO: Add annotation views and images: learn how to most efficiently
reuse an
MLNAnnotationImage.
Implementation
MLNAnnotationImage? dequeueReusableAnnotationImageWithIdentifier(objc.NSString identifier) {
final _ret = _objc_msgSend_1sotr3r(this.ref.pointer, _sel_dequeueReusableAnnotationImageWithIdentifier_, identifier.ref.pointer);
return _ret.address == 0 ? null : MLNAnnotationImage.castFromPointer(_ret, retain: true, release: true);
}