MediaBrowserDelegate

public protocol MediaBrowserDelegate: class

Required delegate to use MediaBrowser

  • Required protocol to use MediaBrowser. return media count

    Declaration

    Swift

    func numberOfMedia(in mediaBrowser: MediaBrowser) -> Int

    Parameters

    mediaBrowser

    MediaBrowser

  • Required protocol to use MediaBrowser. return media

    Declaration

    Swift

    func media(for mediaBrowser: MediaBrowser, at index: Int) -> Media

    Parameters

    mediaBrowser

    MediaBrowser

    index

    Int

  • Optional protocol to mediaBrowser Did Finish Modal Presentation

    Default Implementation

    Declaration

    Swift

    func mediaBrowserDidFinishModalPresentation(mediaBrowser: MediaBrowser)

    Parameters

    mediaBrowser

    MediaBrowser

  • thumbnail(for:at:) Default implementation

    Optional protocol to show thumbnail. return media. Recommand small size

    Default Implementation

    Declaration

    Swift

    func thumbnail(for mediaBrowser: MediaBrowser, at index: Int) -> Media

    Parameters

    mediaBrowser

    MediaBrowser

    index

    Int

  • captionView(for:at:) Default implementation

    Optional protocol to show captionView. return MediaCaptionView.

    Default Implementation

    Declaration

    Swift

    func captionView(for mediaBrowser: MediaBrowser, at index: Int) -> MediaCaptionView?

    Parameters

    mediaBrowser

    MediaBrowser

    index

    Int

  • didDisplayMedia(at:in:) Default implementation

    Optional protocol when need callback

    Default Implementation

    Declaration

    Swift

    func didDisplayMedia(at index: Int, in mediaBrowser: MediaBrowser)

    Parameters

    index

    Int

    mediaBrowser

    MediaBrowser

  • actionButtonPressed(at:in:) Default implementation

    Optional protocol when need callback about action button

    Default Implementation

    Declaration

    Swift

    func actionButtonPressed(at photoIndex: Int, in mediaBrowser: MediaBrowser)

    Parameters

    photoIndex

    Int

    mediaBrowser

    MediaBrowser

  • isMediaSelected(at:in:) Default implementation

    Optional protocol when need callback about isMediaSelected

    Default Implementation

    Declaration

    Swift

    func isMediaSelected(at index: Int, in mediaBrowser: MediaBrowser) -> Bool

    Parameters

    index

    Int

    mediaBrowser

    MediaBrowser

  • mediaDid(selected:at:in:) Default implementation

    Optional protocol when need callback about media selection

    Default Implementation

    Declaration

    Swift

    func mediaDid(selected: Bool, at index: Int, in mediaBrowser: MediaBrowser)

    Parameters

    selected

    Bool

    index

    Int

    mediaBrowser

    MediaBrowser

  • title(for:at:) Default implementation

    Optional protocol for title

    Default Implementation

    Declaration

    Swift

    func title(for mediaBrowser: MediaBrowser, at index: Int) -> String

    Parameters

    mediaBrowser

    MediaBrowser

    index

    Int