HUBComponentWithScrolling

@protocol HUBComponentWithScrolling <HUBComponentWithChildren>

Extended Hub component protocol that adds the ability to scroll between child components.

Use this protocol if your component supports scrolling between components within it. See HUBComponent for more info.

  • Called when programmatically scrolling to a child within this parent component.

    Declaration

    Objective-C

    - (void)scrollToComponentAtIndex:(NSUInteger)childIndex
                      scrollPosition:(HUBScrollPosition)scrollPosition
                            animated:(BOOL)animated
                          completion:(void (^)(void))completion;

    Parameters

    childIndex

    The index of the component that is being scrolled to.

    scrollPosition

    The preferred position of the component after scrolling.

    animated

    Whether or not the scrolling should be animated.

    completion

    The block to call once the component is visible.