Instance Property

contentInset

The distance that the content view is inset from the enclosing scroll view.

Declaration

var contentInset: UIEdgeInsets { get set }

Discussion

Use this property to add to the scrolling area around the content. The unit of size is points. The default value is UIEdgeInsetsZero.

See Also

Managing the Display of Content

func setContentOffset(CGPoint, animated: Bool)

Sets the offset from the content view’s origin that corresponds to the receiver’s origin.

var contentOffset: CGPoint

The point at which the origin of the content view is offset from the origin of the scroll view.

var contentSize: CGSize

The size of the content view.

var contentInsetAdjustmentBehavior: UIScrollViewContentInsetAdjustmentBehavior

The behavior for determining the adjusted content offsets.

Beta
var adjustedContentInset: UIEdgeInsets

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

Beta
func adjustedContentInsetDidChange()

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

Beta