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

# setCameraBoundary(_:animated:)

Sets the camera boundary for the map view, specifying whether to use animation.

```
func setCameraBoundary(_ cameraBoundary: MKMapView.CameraBoundary?, animated: Bool)
```

## Parameters

`cameraBoundary`

The new [`MKMapView.CameraBoundary`](/documentation/MapKit/MKMapView/CameraBoundary-swift.class).

`animated`

A Boolean value that indicates whether the framework animates the transition of the map view to the new boundary.

---

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)