IKSlideshowDataSource Protocol Reference

Adopted by
Framework
System/Library/Frameworks/Quartz.framework/ImageKit.framework
Availability
Available in OS X v10.5 and later.
Declared in
IKSlideshow.h
Related sample code

Overview

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

Tasks

Providing Slideshow Information

Performing Custom Tasks

Instance Methods

canExportSlideshowItemAtIndex:toApplication:

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

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

YES if the export button should be enabled for an item; otherwise NO.

Availability
  • Available in OS X v 10.5 and later.
Declared In
IKSlideshow.h

nameOfSlideshowItemAtIndex:

Returns the display name for item at the specified index.

- (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.
Declared In
IKSlideshow.h

numberOfSlideshowItems

Returns the number of items in a slideshow. (required)

- (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.
Declared In
IKSlideshow.h

slideshowDidChangeCurrentIndex:

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

- (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.
Declared In
IKSlideshow.h

slideshowDidStop

Performs custom tasks when the slideshow stops.

- (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.
See Also
  • – slideshowWillStart
Related Sample Code
Declared In
IKSlideshow.h

slideshowItemAtIndex:

Returns the item for a given index (required)

- (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.
Declared In
IKSlideshow.h

slideshowWillStart

Performs custom tasks when the slideshow is about to start.

- (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.
See Also
  • – slideshowDidStop
Related Sample Code
Declared In
IKSlideshow.h