The layout direction for content in the view.
SDK
- macOS 10.8+
Framework
- App
Kit
Declaration
var userInterfaceLayoutDirection: NSUser Interface Layout Direction { get set }
Discussion
Different languages support different directions for laying out content. While many languages support left-to-right layout, some support right-to-left layout. This property contains the preferred layout direction employed by the view. It is the responsibility of the view to respect this value and lay out its content appropriately.
In macOS 10.9 and later, if no layout direction is set explicitly, this property contains the value reported by the app’s user
property. In prior versions of macOS, it returns the value NSUser
by default. Certain AppKit subclasses, such as NSOutline
, respect the value returned by this method and adjust their layout accordingly.