¡@

Home 

2014/10/15 ¤U¤È 10:11:19

iphone Programming Glossary: mapview.visiblemaprect

Restrict MKMapView scrolling

http://stackoverflow.com/questions/4119117/restrict-mkmapview-scrolling

mapView MKMapView mapView regionWillChangeAnimated BOOL animated if manuallyChangingMapRect return lastGoodMapRect mapView.visibleMapRect void mapView MKMapView mapView regionDidChangeAnimated BOOL animated if manuallyChangingMapRect prevents possible infinite.. object. It could be an ivar or obtained from mapView.overlays array. BOOL mapContainsOverlay MKMapRectContainsRect mapView.visibleMapRect theOverlay.boundingMapRect if mapContainsOverlay The overlay is entirely inside the map view but adjust if user is zoomed.. the map view but adjust if user is zoomed out too much... double widthRatio theOverlay.boundingMapRect.size.width mapView.visibleMapRect.size.width double heightRatio theOverlay.boundingMapRect.size.height mapView.visibleMapRect.size.height if widthRatio 0.6..