Enumeration

UIControl.ContentHorizontalAlignment

The horizontal alignment of content (text and images) within a control.

Declaration

enum ContentHorizontalAlignment : Int

Overview

You use these constants as the value of the contentHorizontalAlignment property.

Topics

Constants

case center

Aligns the content horizontally in the center of the control.

case left

Aligns the content horizontally from the left of the control (the default).

case right

Aligns the content horizontally from the right of the control

case fill

Aligns the content horizontally to fill the content rectangles; text may wrap and images may be stretched.

case leading

Aligns the content horizontally from the leading edge of the control.

case trailing

Aligns the content horizontally from the trailing edge of the control.

See Also

Configuring the Control’s Attributes

var state: UIControl.State

The state of the control, specified as a bitmask value.

var isEnabled: Bool

A Boolean value indicating whether the control is enabled.

var isSelected: Bool

A Boolean value indicating whether the control is in the selected state.

var isHighlighted: Bool

A Boolean value indicating whether the control draws a highlight.

var contentVerticalAlignment: UIControl.ContentVerticalAlignment

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

enum UIControl.ContentVerticalAlignment

Constants for specifying the vertical alignment of content (text and images) in a control.

var contentHorizontalAlignment: UIControl.ContentHorizontalAlignment

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

var effectiveContentHorizontalAlignment: UIControl.ContentHorizontalAlignment

The horizontal alignment currently in effect for the control.