Instance Property

contentHorizontalAlignment

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

Declaration

@property(nonatomic) UIControlContentHorizontalAlignment contentHorizontalAlignment;

Parameters

contentAlignment

A constant that specifies the horizontal alignment of text or images within the control. For a list of possible values, see UIControlContentHorizontalAlignment.

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 is the responsibility of the subclass to determine how to apply this value. The default value of this property is UIControlContentHorizontalAlignmentCenter.

See Also

Configuring the Control’s Attributes

state

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

enabled

A Boolean value indicating whether the control is enabled.

selected

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

highlighted

A Boolean value indicating whether the control draws a highlight.

contentVerticalAlignment

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

UIControlContentVerticalAlignment

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

effectiveContentHorizontalAlignment

The horizontal alignment currently in effect for the control.

UIControlContentHorizontalAlignment

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