<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MapProxy/camera(framing:)-uxov",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:15_MapKit_SwiftUI0A5ProxyV6camera7framingAA0A6CameraVSo9MKMapRecta_tF"
  },
  "title" : "camera(framing:)"
}
-->

# camera(framing:)

Creates a camera in the context of the map that frames the given map rectangle.

```
func camera(framing rect: MKMapRect) -> MapCamera
```

## Parameters

`rect`

The map rectangle to frame.

## Return Value

Returns a [`MapCamera`](/documentation/MapKit/MapCamera) that frames the rectangle you specified.

---

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)