<!--
{
  "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:allowPitch:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:15_MapKit_SwiftUI0A5ProxyV6camera7framing10allowPitchAA0A6CameraVSo9MKMapItemC_SbtF"
  },
  "title" : "camera(framing:allowPitch:)"
}
-->

# camera(framing:allowPitch:)

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

```
func camera(framing item: MKMapItem, allowPitch: Bool = true) -> MapCamera
```

## Parameters

`item`

The [`MKMapItem`](/documentation/MapKit/MKMapItem) to frame.

`allowPitch`

A Boolean value that indicates whether you can pitch the camera to frame the content.

## Return Value

Returns a [`MapCamera`](/documentation/MapKit/MapCamera) with the framing region and pitch 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)