Instance Property

semanticContentAttribute

A semantic description of the view’s contents, used to determine whether the view should be flipped when switching between left-to-right and right-to-left layouts.

Declaration

@property(nonatomic) UISemanticContentAttribute semanticContentAttribute;

Discussion

Some views should not flip when switching between left-to-right and right-to-left layouts. For example, the view is part of the playback controls or represents physical directions (up, down, left, right) that don’t change. Instead of thinking about whether or not a view should change its orientation, select the semantic content attribute that best describes your view.

When creating a view that contains subviews, you can use the userInterfaceLayoutDirectionForSemanticContentAttribute: class method to determine whether the subviews should be flipped, and lay out the views in the appropriate order.

For a list of possible values, see UISemanticContentAttribute.

See Also

Adjusting the User Interface

overrideUserInterfaceStyle

The user interface style adopted by the view and all of its subviews.

effectiveUserInterfaceLayoutDirection

The user interface layout direction appropriate for arranging the immediate content of the view.

+ userInterfaceLayoutDirectionForSemanticContentAttribute:

Returns the user interface direction for the given semantic content attribute.

+ userInterfaceLayoutDirectionForSemanticContentAttribute:relativeToLayoutDirection:

Returns the layout direction implied by the specified semantic content attribute, relative to the specified layout direction.