Mac Developer Library

Developer

AppKit Framework Reference NSSoundDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

NSSoundDelegate

The NSSoundDelegate protocol defines the optional methods implemented by delegates of NSSound objects.

Inheritance


Not Applicable

Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


Available in OS X v10.6 and later.
  • This delegate method is called when an NSSound instance has completed playback of its sound data.

    Declaration

    Swift

    optional func sound(_ sound: NSSound, didFinishPlaying finishedPlaying: Bool)

    Objective-C

    - (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)finishedPlaying

    Parameters

    sound

    The NSSound that has completed playback of its sound data.

    finishedPlaying

    YEStrue when playback was successful; NOfalse otherwise.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.0 and later.

    Available as part of an informal protocol prior to OS X v10.6.