Map annotation Visibility


MKMapRectContainsPoint will tell you if it is visible.
visibleCount = 0;
for (MyAnnotation *annotation in mapView.annotations) {
    if (MKMapRectContainsPoint(mapView.visibleMapRect, MKMapPointForCoordinate(annotation.coordinate)))
    {
        visibleCount++;
    }
}

Comments

Popular posts from this blog

iOS Architecture

Performance Tips for IOS Application

setNeedsLayout vs layoutIfNeeded Explained