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
-
mediaBrowserDidFinishModalPresentation(mediaBrowser:)
Default implementationOptional protocol to mediaBrowser Did Finish Modal Presentation
Default Implementation
Declaration
Swift
func mediaBrowserDidFinishModalPresentation(mediaBrowser: MediaBrowser)
Parameters
mediaBrowser
MediaBrowser
-
thumbnail(for:at:)
Default implementationOptional 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 implementationOptional 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 implementationOptional 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 implementationOptional 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 implementationOptional 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 implementationOptional 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 implementationOptional protocol for title
Default Implementation
Declaration
Swift
func title(for mediaBrowser: MediaBrowser, at index: Int) -> String
Parameters
mediaBrowser
MediaBrowser
index
Int