<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKMapView/convert(_:toRegionFrom:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKMapView(im)convertRect:toRegionFromView:"
  },
  "title" : "convert(_:toRegionFrom:)"
}
-->

# convert(_:toRegionFrom:)

Converts a rectangle in the specified view’s coordinate system to a map region.

iOS, iPadOS, Mac Catalyst, tvOS, visionOS:

```
func convert(_ rect: CGRect, toRegionFrom view: UIView?) -> MKCoordinateRegion
```

macOS:

```
func convert(_ rect: CGRect, toRegionFrom view: NSView?) -> MKCoordinateRegion
```

## Parameters

`rect`

The rectangle you want to convert.

`view`

The view that serves as the reference coordinate system for the `rect` parameter.

## Return Value

The map region corresponding to the specified view rectangle.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)