Interface QLPreviewControllerDataSource


  • public interface QLPreviewControllerDataSource
    The QLPreviewControllerDataSource protocol declares the methods that the Preview Controller uses to access the contents of its data source object.
    • Method Detail

      • numberOfPreviewItemsInPreviewController

        long numberOfPreviewItemsInPreviewController​(@NotNull
                                                     @NotNull QLPreviewController controller)
        Returns the number of items that the preview controller should preview.
        Parameters:
        controller - The Preview Controller.
        Returns:
        The number of items.
      • previewControllerPreviewItemAtIndex

        @NotNull
        @NotNull QLPreviewItem previewControllerPreviewItemAtIndex​(@NotNull
                                                                   @NotNull QLPreviewController controller,
                                                                   long index)
        Returns the item that the preview controller should preview.
        Parameters:
        controller - The Preview Controller.
        index - The index of the item to preview.
        Returns:
        An item conforming to the QLPreviewItem protocol.