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

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

Instance Methods

Relationships

See Also

Related Types

struct UIEdgeInsets

The inset distances for views.

struct NSDirectionalEdgeInsets

Edge insets that take language direction into account.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software