Interface CALayerDelegate

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default @Nullable CAAction actionForLayerForKey​(@NotNull CALayer layer, @NotNull java.lang.String event)
      If defined, called by the default implementation of the -actionForKey: method.
      default void displayLayer​(@NotNull CALayer layer)
      If defined, called by the default implementation of the -display method, in which case it should implement the entire display process (typically by setting the `contents' property).
      default void drawLayerInContext​(@NotNull CALayer layer, @NotNull CGContextRef ctx)
      If defined, called by the default implementation of -drawInContext:
      default void layerWillDraw​(@NotNull CALayer layer)
      If defined, called by the default implementation of the -display method.
      default void layoutSublayersOfLayer​(@NotNull CALayer layer)
      Called by the default -layoutSublayers implementation before the layout manager is checked.
    • Method Detail

      • actionForLayerForKey

        @Nullable
        default @Nullable CAAction actionForLayerForKey​(@NotNull
                                                        @NotNull CALayer layer,
                                                        @NotNull
                                                        @NotNull java.lang.String event)
        If defined, called by the default implementation of the -actionForKey: method. Should return an object implementing the CAAction protocol. May return 'nil' if the delegate doesn't specify a behavior for the current event. Returning the null object (i.e. '[NSNull null]') explicitly forces no further search. (I.e. the +defaultActionForKey: method will not be called.)
      • displayLayer

        default void displayLayer​(@NotNull
                                  @NotNull CALayer layer)
        If defined, called by the default implementation of the -display method, in which case it should implement the entire display process (typically by setting the `contents' property).
      • drawLayerInContext

        default void drawLayerInContext​(@NotNull
                                        @NotNull CALayer layer,
                                        @NotNull
                                        @NotNull CGContextRef ctx)
        If defined, called by the default implementation of -drawInContext:
      • layerWillDraw

        default void layerWillDraw​(@NotNull
                                   @NotNull CALayer layer)
        If defined, called by the default implementation of the -display method. Allows the delegate to configure any layer state affecting contents prior to -drawLayer:InContext: such as `contentsFormat' and `opaque'. It will not be called if the delegate implements -displayLayer. API-Since: 10.0
      • layoutSublayersOfLayer

        default void layoutSublayersOfLayer​(@NotNull
                                            @NotNull CALayer layer)
        Called by the default -layoutSublayers implementation before the layout manager is checked. Note that if the delegate method is invoked, the layout manager will be ignored.