アップルのドキュメントによると、visibleMapRect を呼び出すと MKMapRect のインスタンスが返されるはずですが、代わりに MKCoordinateRegion を取得しています。
class MyMapController < UIViewController
def loadView
super
self.view = MKMapView.alloc.init
view.delegate = self
end
def viewDidLoad
region = MKCoordinateRegionMake(
CLLocationCoordinate2D.new(20.7103500366211, -101.607849121094),
MKCoordinateSpanMake(18, 18)
)
view.setRegion region, animated: false
end
def mapView map, regionDidChangeAnimated: animated
puts map.visibleMapRect.inspect
# prints => <MKCoordinateRegion center=#<CLLocationCoordinate2D latitude=47967664.0 longitude=106401408.0> span=#<MKCoordinateSpan latitudeDelta=20971520.0 longitudeDelta=24051712.0>>
end
end