Next Page > Hide TOC

IKSlideshowDataSource Protocol Reference

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

Overview

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

Important: Slide show data source methods may be called on secondary threads. When you implement these methods, you must ensure that they are safe to run on threads other than the main thread.

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.

Discussion

This method is optional.

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

numberOfSlideshowItems

Returns the number of items in a slideshow.

- (NSUInteger)numberOfSlideshowItems;

Return Value

The number of items in the slideshow.

Discussion

Your data source must implement this method.

Availability
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

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

Availability
Declared In
IKSlideshow.h

slideshowDidStop

Performs custom tasks when the slideshow stops.

- (void)slideshowDidStop;

Discussion

This method is optional. Image Kit invokes this method when the slideshow stops. Implement this method to perform custom tasks at that time.

Availability
See Also
Declared In
IKSlideshow.h

slideshowItemAtIndex:

Returns the item for a given index

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

slideshowWillStart

Performs custom tasks when the slideshow is about to start.

- (void)slideshowWillStart;

Discussion

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

Availability
See Also
Declared In
IKSlideshow.h

Next Page > Hide TOC


© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-03-04)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.