---
title: contentVerticalAlignment
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicontrol/contentverticalalignment-swift.property
---

# contentVerticalAlignment

The vertical alignment of content within the control’s bounds.

## Declaration

```swift
var contentVerticalAlignment: UIControl.ContentVerticalAlignment { get set }
```

## Parameters

- `contentAlignment`: A constant that specifies the vertical alignment of text or images within the control. For a list of possible values, see doc://com.apple.uikit/documentation/UIKit/UIControl/ContentVerticalAlignment-swift.enum.

## Discussion

Discussion For controls that contain configurable text or image content, use this property to align that content appropriately inside the control’s bounds. Not all control subclasses have content that can be aligned, and it’s the responsibility of the subclass to determine how to apply this value. The default value of this property is UIControl.ContentVerticalAlignment.top.

## See Also

### Specifying content alignment

- [UIControl.ContentVerticalAlignment](uikit/uicontrol/contentverticalalignment-swift.enum.md)
- [contentHorizontalAlignment](uikit/uicontrol/contenthorizontalalignment-swift.property.md)
- [effectiveContentHorizontalAlignment](uikit/uicontrol/effectivecontenthorizontalalignment.md)
- [UIControl.ContentHorizontalAlignment](uikit/uicontrol/contenthorizontalalignment-swift.enum.md)
