---
title: "PreviewLayout.fixed(width:height:)"
framework: developertoolssupport
role: symbol
role_heading: Case
path: "developertoolssupport/previewlayout/fixed(width:height:)"
---

# PreviewLayout.fixed(width:height:)

Center the preview in a fixed size container with the given dimensions.

## Declaration

```swift
case fixed(width: CGFloat, height: CGFloat)
```

## Parameters

- `width`: The width of the container.
- `height`: The height of the container.

## See Also

### Getting a layout

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