Structure

UIOffset

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

Declaration

struct UIOffset

Overview

The components are positive for right or down, negative for left or up.

See also init(horizontal:vertical:) and zero.

Topics

Managing Offsets

init(horizontal: CGFloat, vertical: CGFloat)

Returns an offset structure from the given components.

func UIOffsetEqualToOffset(UIOffset, UIOffset) -> Bool

Returns a Boolean value that indicates whether two offsets are equal.

Deprecated

Converting To and From Strings

class func string(for: UIOffset) -> String

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

class func uiOffset(for: String) -> UIOffset

Returns a UIKit offset structure corresponding to the data in a given string.

Getting the Empty Offset Value

Relationships

Conforms To

See Also

Related Types

struct UIEdgeInsets

The inset distances for views.

struct NSDirectionalEdgeInsets

Edge insets that take language direction into account.