Function

UIEdgeInsetsFromString

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

Declaration

UIEdgeInsets UIEdgeInsetsFromString(NSString *string);

Parameters

string

A string whose contents are of the form “{top, left, bottom, right}”, where top, left, bottom, right are the floating-point component values of the UIEdgeInsets 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

An edge insets data structure. If the string is not well-formed, the function returns UIEdgeInsetsZero.

Discussion

In general, you should use this function only to convert strings that were previously created using the NSStringFromUIEdgeInsets function.

See Also

Converting To and From Strings

NSStringFromUIEdgeInsets

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