With MapKit in the iPhone 3.0 SDK, you create objects that conform to the MKAnnotation protocol. Loading these onto the MKMapView is very easy. However, when a user scrolls the MKMapView, it's time to load new annotations. A likely place to request the new objects would be in mapView:regionDidChangeAnimated: which is called when the map's region is changed, and then add/replace the annotations with the new ones.
Specifically, I'd like to query Core Data to retrieve all objects that exist within the current MKCoordinateRegion (mapView.region) so that I'm loading only the objects that will be shown on the screen. The objects in Core Data have latitude and longitude attributes (and a CLLocation attribute is defined in the class' .m/.h which I can populate manually from that) and use this for a NSPredicate for finding nearby objects.
Due to the nature of how many objects exist in the Core Data database, we can not preload ALL objects as annotations or else we'll run out of memory (and it would be excruciatingly slow).
How can I retrieve only the objects that have locations in the current mapview bounds?