Mac Developer Library

Developer

Quartz Framework Reference 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. More...

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


import Quartz @import Quartz;

Availability


Available in OS X v10.5 and later.
  • Returns the number of items in a slideshow. (required)

    Declaration

    Swift

    func numberOfSlideshowItems() -> Int

    Objective-C

    - (NSUInteger)numberOfSlideshowItems

    Return Value

    The number of items in the slideshow.

    Discussion

    Your data source must implement this method.

    Import Statement

    import Quartz

    Availability

    Available in OS X v 10.5 and later.

  • Returns the item for a given index (required)

    Declaration

    Swift

    func slideshowItemAtIndex(_ index: Int) -> AnyObject!

    Objective-C

    - (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.

    Import Statement

    import Quartz

    Availability

    Available in OS X v 10.5 and later.

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

    Declaration

    Swift

    optional func nameOfSlideshowItemAtIndex(_ index: Int) -> String!

    Objective-C

    - (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.

    Import Statement

    import Quartz

    Availability

    Available in OS X v 10.5 and later.

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

    Declaration

    Swift

    optional func canExportSlideshowItemAtIndex(_ index: Int, toApplication applicationBundleIdentifier: String!) -> Bool

    Objective-C

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

    Return Value

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

    Import Statement

    import Quartz

    Availability

    Available in OS X v 10.5 and later.

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

    Declaration

    Swift

    optional func slideshowWillStart()

    Objective-C

    - (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.

    Import Statement

    import Quartz

    Availability

    Available in OS X v 10.5 and later.

  • Performs custom tasks when the slideshow stops.

    Declaration

    Swift

    optional func slideshowDidStop()

    Objective-C

    - (void)slideshowDidStop

    Discussion

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

    Import Statement

    import Quartz

    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

    Swift

    optional func slideshowDidChangeCurrentIndex(_ newIndex: Int)

    Objective-C

    - (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.

    Import Statement

    import Quartz

    Availability

    Available in OS X v 10.5 and later.