PagedMediaDataSource
@MainActor
public protocol PagedMediaDataSource : AnyObject
Data source for providing media items and original views for transition animations.
-
Number of items to be presented.
Declaration
Swift
@MainActor func numberOfItems(in pagedMediaViewController: PagedMediaViewController) -> Int -
presentationViewInsets(for:Default implementation) Adds insets on
PagedMediaViewController‘s view presentation frame. Defaults to.zero. Useful for preventing presentation over promotional content.Default Implementation
Declaration
Swift
@MainActor func presentationViewInsets(for pagedMediaViewController: PagedMediaViewController) -> UIEdgeInsets -
Provides the media item view for the given index.
Declaration
Swift
@MainActor func pagedMediaViewController(_ pagedMediaViewController: PagedMediaViewController, pagedMediaViewForItemAt index: Int) -> PagedMediaItem -
Provides the original view for the given index. Used for transition animations.
Declaration
Swift
@MainActor func pagedMediaViewController(_ pagedMediaViewController: PagedMediaViewController, originalViewForItemAt index: Int) -> UIView -
pagedMediaViewController(_:Default implementationtransitionImageForItemAt: ) Optional method for specifying the original image for the view or a snapshot. By default
PagedMediaTransitionDriverwill create a snapshot from the original view.Default Implementation
Declaration
Swift
@MainActor func pagedMediaViewController(_ pagedMediaViewController: PagedMediaViewController, transitionImageForItemAt index: Int) -> UIImage?
View on GitHub
Install in Dash