---
title: "camera(framing:allowPitch:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mapproxy/camera(framing:allowpitch:)"
---

# camera(framing:allowPitch:)

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

## Declaration

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

## Parameters

- `item`: The doc://com.apple.mapkit/documentation/MapKit/MKMapItem to frame.
- `allowPitch`: A Boolean value that indicates whether you can pitch the camera to frame the content.

## Return Value

Return Value Returns a MapCamera with the framing region and pitch you specified.

## See Also

### Creating a camera proxy

- [camera(framing:)](mapkit/mapproxy/camera(framing:)-1asl2.md)
- [camera(framing:)](mapkit/mapproxy/camera(framing:)-uxov.md)
