Instance Property

enabled

A Boolean value indicating whether the control is enabled.

Declaration

@property(nonatomic, getter=isEnabled) BOOL enabled;

Discussion

Set the value of this property to YES to enable the control or NO to disable it. An enabled control is capable of responding to user interactions, whereas a disabled control ignores touch events and may draw itself differently. Setting this property to NO adds the UIControlStateDisabled flag to the control’s state bitmask; enabling the control again removes that flag.

The default value of this property is YES for a newly created control. You can set a control’s initial enabled state in your storyboard file.

See Also

Configuring the Control’s Attributes

state

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

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.

contentHorizontalAlignment

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

effectiveContentHorizontalAlignment

The horizontal alignment currently in effect for the control.

UIControlContentHorizontalAlignment

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