Instance Property


The custom distance that the content view is inset from the safe area or scroll view edges.


@property(nonatomic) UIEdgeInsets contentInset;


Use this property to extend the space between your content and the edges of the content view. The unit of size is points. The default value is UIEdgeInsetsZero.

By default, UIKit automatically adjusts the content inset to account for overlapping bars. You use this property to extend that distance even further, perhaps to accommodate your own custom content. Get the total adjustment—that is, the safe area plus your custom insets—using the adjustedContentInset property. To change how the safe area is applied, modify the contentInsetAdjustmentBehavior property.

See Also

Managing the Content Inset Behavior


The insets derived from the content insets and the safe area of the scroll view.


The behavior for determining the adjusted content offsets.


Constants indicating how safe area insets are added to the adjusted content inset.

- adjustedContentInsetDidChange

Called when the adjusted content insets of the scroll view change.