Structure

UIEdgeInsets

The inset distances for views.

Declaration

typedef struct UIEdgeInsets {
    ...
} UIEdgeInsets;

Overview

Edge inset values are applied to a rectangle to shrink or expand the area represented by that rectangle. Typically, edge insets are used during view layout to modify the view’s frame. Positive values cause the frame to be inset (or shrunk) by the specified amount. Negative values cause the frame to be outset (or expanded) by the specified amount.

See also UIEdgeInsetsMake and UIEdgeInsetsZero.

Topics

Creating Edge Insets

UIEdgeInsetsMake

Creates an edge inset for a button or view.

Getting the Edge Values

bottom

The bottom edge inset value.

left

The left edge inset value.

right

The right edge inset value.

top

The top edge inset value.

Comparing Edge Insets

UIEdgeInsetsEqualToEdgeInsets

Returns a Boolean value indicating whether the two edge insets are the same.

Managing Edge Insets

UIEdgeInsetsInsetRect

Adjusts a rectangle by the given edge insets.

Converting To and From Strings

NSStringFromUIEdgeInsets

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

UIEdgeInsetsFromString

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

Getting the Empty Edge Insets

UIEdgeInsetsZero

An edge insets struct whose top, left, bottom, and right fields are all set to 0.

See Also

Related Types

NSDirectionalEdgeInsets

Edge insets that take language direction into account.

UIOffset

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