MDCElevatable

@protocol MDCElevatable <NSObject>

Provides APIs for @c UIViews to communicate their elevation throughout the view hierarchy.

  • The current elevation of the conforming @c UIView.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) CGFloat mdc_currentElevation;
  • This block is called when the elevation changes for the conforming @c UIView or @c UIViewController receiver or one of its direct ancestors in the view hierarchy.

    Use this block to respond to elevation changes in the view or its ancestor views.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) void (^)
        (id<MDCElevatable> _Nonnull, CGFloat) mdc_elevationDidChangeBlock;

    Parameters

    absoluteElevation

    The @c mdc_currentElevation plus the @c mdc_currentElevation of all ancestor views. This equates to @c mdc_absoluteElevation of the UIView+MaterialElevationResponding category.

    object

    The receiver (self) which conforms to the protocol.