Mac Developer Library

Developer

IKSlideshowDataSource Protocol Reference

Options
Deployment Target:

On This Page
Language:

IKSlideshowDataSource

The IKSlideshowDataSource protocol describes the methods that an IKSlideshow object uses to access the contents of its data source object.

  • Returns the number of items in a slideshow.

    Declaration

    - (NSUInteger)numberOfSlideshowItems

    Return Value

    The number of items in the slideshow.

    Discussion

    Your data source must implement this method.

    Availability

    Available in OS X v 10.5 and later.

  • Returns the item for a given index

    Declaration

    - (id)slideshowItemAtIndex:(NSUInteger)index

    Parameters

    index

    An index of an item in the slideshow.

    Return Value

    The object that corresponds to the item at the specified index. The item can be any of the following objects: NSImage, NSString (to specify a path name), NSURL, NSFileWrapper, CGImageRef, or PDFPage.

    Discussion

    Your data source must implement this method.

    Availability

    Available in OS X v 10.5 and later.

  • Returns the display name for item at the specified index.

    Declaration

    - (NSString *)nameOfSlideshowItemAtIndex:(NSUInteger)index

    Parameters

    index

    The index for a slideshow item.

    Return Value

    The display name. For the best user experience, you should provide the localized name, because this string appears in the user interface.

    Discussion

    This method is optional.

    Availability

    Available in OS X v 10.5 and later.

  • Reports whether the export button should be enabled for a a slideshow item.

    Declaration

    - (BOOL)canExportSlideshowItemAtIndex:(NSUInteger)index toApplication:(NSString *)applicationBundleIdentifier

    Return Value

    YEStrue if the export button should be enabled for an item; otherwise NOfalse.

    Availability

    Available in OS X v 10.5 and later.

  • Performs custom tasks when the slideshow is about to start.

    Declaration

    - (void)slideshowWillStart

    Discussion

    Image Kit invokes this method when the slideshow is about to start. Implement this method to perform custom tasks at that time.

    Availability

    Available in OS X v 10.5 and later.

  • Performs custom tasks when the slideshow stops.

    Declaration

    - (void)slideshowDidStop

    Discussion

    TImage Kit invokes this method when the slideshow stops. Implement this method to perform custom tasks at that time.

    Availability

    Available in OS X v 10.5 and later.

  • Performs custom tasks when the slideshow changes to the item at the specified index.

    Declaration

    - (void)slideshowDidChangeCurrentIndex:(NSUInteger)newIndex

    Parameters

    newIndex

    The index of the current item.

    Discussion

    Image Kit invokes this method when the slideshow changes to the specified item. Implement this method to perform custom tasks at that time.

    Availability

    Available in OS X v 10.5 and later.