Get TopLeft and BottomRight from MKCoordinateRegion MKMapView

mkcoordinateregion, mkcoordinatespan, mkmapview, objective-c

Solution

I don't think these calculations qualify as weird:

CLLocationCoordinate2D center = region.center;
CLLocationCoordinate2D northWestCorner, southEastCorner;
northWestCorner.latitude  = center.latitude  + (region.span.latitudeDelta  / 2.0);
northWestCorner.longitude = center.longitude - (region.span.longitudeDelta / 2.0);
southEastCorner.latitude  = center.latitude  - (region.span.latitudeDelta  / 2.0);
southEastCorner.longitude = center.longitude + (region.span.longitudeDelta / 2.0);

Problem

I checked the properties in documentation for `MKCoordinateRegion`, `MKCoordinateSpan` and `MKMapView` to see there is a way to get the TopLeft and BottomRight Lat Long from the map view and I didn't find any. I know that the span gives me the Lat long delta but is there a way to get the actual TopLeft and BottomRight lat longs from map view without having to do weird calculations? I found this. Not sure if that is accurate enough. Any votes for that?

Original source

Related problems