UIView(MaterialElevationResponding)

@interface UIView (MaterialElevationResponding)

Allows elevation changes to propagate down the view hierarchy and allows objects conforming to @c MDCElevatable to react to those changes accordingly.

  • Returns the sum of all @c mdc_currentElevation of the superviews going up the view hierarchy recursively.

    If a view in the hierarchy conforms to @c MDCElevationOveriding and @c mdc_overrideBaseElevation is non-negative, then the sum of the current total plus the value of @c mdc_overrideBaseElevation is returned.

    If a @c UIViewController conforms to @c MDCElevatable or @c MDCElevationOveriding then its @c view will report the view controllers base elevation.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) CGFloat mdc_baseElevation;
  • Returns the sum of the view’s @c mdc_currentElevation with the @c mdc_currentElevation of its superviews going up the view hierarchy recursively.

    This value is effectively the sum of @c mdc_baseElevation and @c mdc_currentElevation.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) CGFloat mdc_absoluteElevation;
  • Should be called when the view’s @c mdc_currentElevation has changed. Will be called on the receiver’s @c subviews.

    If a @c UIView views conform to @c MDCElevation then @c mdc_elevationDidChangeBlock: is called.

    Declaration

    Objective-C

    - (void)mdc_elevationDidChange;