Wednesday, May 22, 2013

userInterfaceLayoutDirection example UIApplication ios


[UIApplication userInterfaceLayoutDirection]

Returns the layout direction of the user interface. (read-only)
@property(nonatomic, readonly) UIUserInterfaceLayoutDirection userInterfaceLayoutDirection
Discussion of [UIApplication userInterfaceLayoutDirection]
This method specifies the general user interface layout flow direction. See“UIUserInterfaceLayoutDirection” for a description of the constants returned by this property.
Example of [UIApplication userInterfaceLayoutDirection]
if ( [[UIApplication sharedApplication] respondsToSelector(userInterfaceLayoutDirection)] ) {
    // userInterfaceLayoutDirection is only available in iOS 5+
    // use 5.0+ version of xib
}