UIView(ContentChromeInset) Category Reference

Declared in UIView+ContentChromeInset.h

Overview

UIView content chrome insets transmission and events.

The content chrome insets are the content inset that must be used to avoid overarching chrome such as toolbars.

  contentChromeInset

The insets to be used when laying out content to avoid any overlapping chrome from the parent view(s).

@property (nonatomic) UIEdgeInsets contentChromeInset

Declared In

UIView+ContentChromeInset.h

  shouldAutomaticallyReceiveContentChromeInsetFromSuperview

Whether the view should inherit its contentChromeInset value from the parent on layout. The default value is true.

@property (nonatomic) BOOL shouldAutomaticallyReceiveContentChromeInsetFromSuperview

Declared In

UIView+ContentChromeInset.h

  shouldAutomaticallyForwardContentChromeInsetsForSubviews

Whether the view should automatically set the contentChromeInset values of it’s subviews on layoutSubviews.

@property (nonatomic) BOOL shouldAutomaticallyForwardContentChromeInsetsForSubviews

Declared In

UIView+ContentChromeInset.h

  contentBounds

The bounds available for content after having applied the contentChromeInset.

@property (nonatomic, readonly) CGRect contentBounds

Declared In

UIView+ContentChromeInset.h

– contentChromeInsetForSubview:

Calculates the content chrome insets for a subview.

- (UIEdgeInsets)contentChromeInsetForSubview:(nullable UIView *)subview

Parameters

subview

The subview to calculate the content chrome insets for.

Return Value

The calculated content chrome insets.

Declared In

UIView+ContentChromeInset.h

– contentChromeInsetDidChangeTo:fromInset:

Called when the content chrome insets are changed.

- (void)contentChromeInsetDidChangeTo:(UIEdgeInsets)contentChromeInset fromInset:(UIEdgeInsets)fromContentChromeInset

Parameters

contentChromeInset

The prevous content chrome insets.

fromContentChromeInset

The new and current content chrome insets.

Declared In

UIView+ContentChromeInset.h