---
title: View Layout
framework: appkit
role: collectionGroup
role_heading: API Collection
path: appkit/view-layout
---

# View Layout

Position and size views using a stack view or Auto Layout constraints.

## Overview

Overview When you design your app’s interface, you position views and other interface elements in your app’s windows and size them appropriately. However, the size and position of those views may need to change at runtime for a few reasons: The user resizes the window containing your views. The user’s language choice requires size changes for labels and text-based views. NSStackView objects adjust the position of their contained views automatically when interface dimensions change. Alternatively, Auto Layout constraints let you specify the rules that determine the precise size and position of the views in your interface

## Topics

### Stack View

- [NSStackView](appkit/nsstackview.md)

### Auto Layout Constraints

- [NSLayoutConstraint](appkit/nslayoutconstraint.md)

### Layout Guides

- [NSLayoutGuide](appkit/nslayoutguide.md)
- [NSLayoutDimension](appkit/nslayoutdimension.md)

### Anchors

- [NSLayoutAnchor](appkit/nslayoutanchor.md)
- [NSLayoutXAxisAnchor](appkit/nslayoutxaxisanchor.md)
- [NSLayoutYAxisAnchor](appkit/nslayoutyaxisanchor.md)

### View Compression

- [NSUserInterfaceCompression](appkit/nsuserinterfacecompression.md)

## See Also

### User Interface

- [Views and Controls](appkit/views-and-controls.md)
- [View Management](appkit/view-management.md)
- [Appearance Customization](appkit/appearance-customization.md)
- [Animation](appkit/animation.md)
- [Windows, Panels, and Screens](appkit/windows-panels-and-screens.md)
- [Sound, Speech, and Haptics](appkit/sound-speech-and-haptics.md)
- [Supporting Continuity Camera in Your Mac App](appkit/supporting-continuity-camera-in-your-mac-app.md)
