---
title: dynamicAspectRatio
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcapturedevice/dynamicaspectratio
---

# dynamicAspectRatio

A key-value observable property indicating the current aspect ratio for a device.

## Declaration

```swift
var dynamicAspectRatio: AVCaptureDevice.AspectRatio? { get }
```

## Discussion

Discussion This property is initialized to the first AVCaptureDevice.AspectRatio listed in the device’s activeFormat’s supportedDynamicAspectRatios property. If the activeFormat’s supportedDynamicAspectRatios is an empty array, this property returns nil.

## See Also

### Configuring dynamic aspect ratio

- [setDynamicAspectRatio(_:completionHandler:)](avfoundation/avcapturedevice/setdynamicaspectratio(_:completionhandler:).md)
- [AVCaptureDevice.AspectRatio](avfoundation/avcapturedevice/aspectratio.md)
- [dynamicDimensions](avfoundation/avcapturedevice/dynamicdimensions.md)
