BarabaDelegate

public protocol BarabaDelegate : AnyObject

Methods you can implement to be notified of Baraba events and life cycle changes.

  • barabaDidStartScrolling(_:) Default implementation

    Tells the delegate that Baraba initiated the auto-scrolling.

    The Baraba object scrolls the scrollView when it is active and when user is looking at the screen.

    Default Implementation

    Declaration

    Swift

    func barabaDidStartScrolling(_ baraba: Baraba)

    Parameters

    baraba

    The baraba object that initiated the scrolling.

  • barabaDidStopScrolling(_:) Default implementation

    Tells the delegate that Baraba stopped the auto-scrolling.

    The Baraba object stops the scrolling for several reasons. When the user starts interacting with the scroll view (e.g. dragging), or when camera session is interrupted(e.g. app goes into background). Once it starts scrolling again, func barabaDidStartScrolling(_:) method will be called.

    When Baraba is not auto-scrolling, aforementioned events will not trigger this method. Also, calling func pause() on the Baraba will not trigger this method.

    Default Implementation

    Declaration

    Swift

    func barabaDidStopScrolling(_ baraba: Baraba)

    Parameters

    baraba

    The baraba object that stopped the scrolling.

  • baraba(_:didFailWithError:) Default implementation

    Tells the delegate that Baraba has stopped running due to an error.

    Default Implementation

    Declaration

    Swift

    func baraba(_ baraba: Baraba, didFailWithError error: Error)

    Parameters

    baraba

    The baraba object that failed.

    error

    An error object describing the failure.