previewDimensions
The size, in pixels, of the preview image that the system delivers with the capture.
Declaration
var previewDimensions: CMVideoDimensions { get }Discussion
Use the previewPhotoFormat property in your photo settings object to request delivery of a preview image alongside the main photo output from the capture. When you request a preview, the photo output chooses dimensions that best match your requested size while preserving the aspect ratio of the captured photo. Aspect ratio is determined by capture format and by device orientation at the moment of capture.
This property provides the dimensions of the requested preview image, which is delivered in the photoOutput(_:didFinishProcessingPhoto:error:) method. Use this property in earlier delegate methods to find the size of the image before delivery.
If you do not request a preview image, this property’s value has zero width and zero height.