---
title: PreviewLayout.sizeThatFits
framework: developertoolssupport
role: symbol
role_heading: Case
path: developertoolssupport/previewlayout/sizethatfits
---

# PreviewLayout.sizeThatFits

Fit the container to the size of the preview when offered the size of the device that the preview is running on.

## Declaration

```swift
case sizeThatFits
```

## See Also

### Getting a layout

- [PreviewLayout.device](developertoolssupport/previewlayout/device.md)
- [PreviewLayout.fixed(width:height:)](developertoolssupport/previewlayout/fixed(width:height:).md)
- [PreviewLayout.fixed3D(width:height:depth:)](developertoolssupport/previewlayout/fixed3d(width:height:depth:).md)
