Edge insets that take language direction into account.


struct NSDirectionalEdgeInsets


Creating Directional Edge Insets


Initializes the edge inset struct to default values.

Getting the Edge Values

var bottom: CGFloat

The bottom edge inset value.

var leading: CGFloat

The leading edge inset value.

var top: CGFloat

The top edge inset value.

var trailing: CGFloat

The trailing edge inset value.

Converting To and From a String

class func string(for: NSDirectionalEdgeInsets) -> String

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

class func nsDirectionalEdgeInsets(for: String) -> NSDirectionalEdgeInsets

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

Getting the Empty Edge Insets

static let zero: NSDirectionalEdgeInsets

A directional edge insets struct whose top, leading, bottom, and trailing fields are all set to 0.

Instance Methods


See Also

Related Types

struct UIEdgeInsets

The inset distances for views.

struct UIOffset

Defines a structure that specifies an amount to offset a position.