Type Method

userInterfaceLayoutDirectionForSemanticContentAttribute:relativeToLayoutDirection:

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

Declaration

+ (UIUserInterfaceLayoutDirection)userInterfaceLayoutDirectionForSemanticContentAttribute:(UISemanticContentAttribute)semanticContentAttribute relativeToLayoutDirection:(UIUserInterfaceLayoutDirection)layoutDirection;

Parameters

semanticContentAttribute

The semantic content attribute for a view.

layoutDirection

Return Value

The layout direction implied by the semantic content attribute and relative to the layout direction.

Discussion

For example, when this method is passed a layout direction of UIUserInterfaceLayoutDirectionRightToLeft and a semantic content attribute of UISemanticContentAttributePlayback, it returns UIUserInterfaceLayoutDirectionLeftToRight. Although layout and drawing code can use this method to determine how to arrange elements, it might be easier to query the container view’s effectiveUserInterfaceLayoutDirection property instead.

See Also

Adjusting the User Interface

overrideUserInterfaceStyle

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

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.

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.