Function

NSDirectionalEdgeInsetsFromString

Returns a directional edge insets structure based on the data in the specified string.

Declaration

NSDirectionalEdgeInsets NSDirectionalEdgeInsetsFromString(NSString *string);

Parameters

string

A string whose contents are of the form “{top, leading, bottom, trailing}”, where top, leading, bottom, trailing are the floating-point component values of the NSDirectionalEdgeInsets structure. An example of a valid string is ”{3.0,8.0,3.0,5.0}”. The string is not localized, so items are always separated with a comma.

Return Value

A directional edge insets data structure. If the string is not well-formed, the function returns NSDirectionalEdgeInsetsZero.

See Also

Converting To and From a String

NSStringFromDirectionalEdgeInsets

Returns a string formatted to contain the data from a directional edge insets structure.