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​(QLPreviewController controller)
        Returns the number of items that the preview controller should preview.
        Parameters:
        controller - The Preview Controller.
        Returns:
        The number of items.
      • previewControllerPreviewItemAtIndex

        QLPreviewItem previewControllerPreviewItemAtIndex​(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.