Closed stasivanov closed 7 years ago
You can have access to a cluster's annotations :
id<CKAnnotation> annotation = cluster.firstAnnotation;
id<CKAnnotation> annotation = cluster.lastAnnotation;
id<CKAnnotation> annotation = cluster[3];
for(id<CKAnnotation> annotation in cluster) {
...
}
Thanks. But sometimes there is a specific case, when I need just cluster.annotations
. It would be better to make it read only.
Also, I cannot make that "for in loop" works in Swift.
For in loop works with adding extension
extension CKCluster: Sequence { public func makeIterator() -> NSFastEnumerationIterator { return NSFastEnumerationIterator(self) } }
Sometimes it is very useful to get annotations that are combined under specific cluster to have more flexibility around annotationView text, and not just show count of objects there. Please make it public