Mac OS X Reference Library Apple Developer
Search

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.

Availability
  • Available in Mac 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 Mac 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 Mac 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 Mac 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 Mac OS X v 10.5 and later.
See Also
  • – slideshowWillStart
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 Mac 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 Mac OS X v 10.5 and later.
See Also
  • – slideshowDidStop
Declared In
IKSlideshow.h



Last updated: 2009-08-25

Did this document help you? Yes It's good, but... Not helpful...