Mac Developer Library

Developer

AppKit Framework Reference NSMediaLibraryBrowserController Class Reference

Options
Deployment Target:

On This Page
Language:

NSMediaLibraryBrowserController

An NSMediaLibraryBrowserController instance configures and displays a Media Library Browser panel. From this panel a user can drag media into views in their app. The class provides a standard interface to the MediaLibrary framework content. More...

Inheritance


  • NSObject
  • NSMediaLibraryBrowserController
  • NSObject
  • NSMediaLibraryBrowserController

Conforms To


Import Statement


import AppKit @import AppKit;

Availability


Available in OS X v10.9 and later.
  • Returns the shared Media Library Browser instance.

    Declaration

    Swift

    class func sharedMediaLibraryBrowserController() -> NSMediaLibraryBrowserController

    Objective-C

    + (NSMediaLibraryBrowserController *)sharedMediaLibraryBrowserController

    Return Value

    The shared Media Library Browser controller instance.

    Discussion

    The Media Library Browser panel is a proxy to allow easy display of the media library within an app.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.9 and later.

  • frame frame Property

    The frame, in global coordinates, used to display the Media Library Browser panel.

    Declaration

    Swift

    var frame: NSRect

    Objective-C

    @property NSRect frame

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.9 and later.

  • Toggles the visibility of the Media Library Browser.

    Declaration

    Swift

    @IBAction func togglePanel(_ sender: AnyObject?)

    Objective-C

    - (IBAction)togglePanel:(id)sender

    Parameters

    sender

    The sender of the message.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.9 and later.

  • visible visible Property

    A Boolean value that determines whether the Media Library Browser panel is visible.

    Declaration

    Swift

    var visible: Bool

    Objective-C

    @property(getter=isVisible) BOOL visible

    Discussion

    Set this value to YEStrue to show the Media Library Browser or NOfalse to hide it.

    This value can be read to determine the current visibility status of the panel.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.9 and later.

  • The media library that is in use.

    Declaration

    Swift

    var mediaLibraries: NSMediaLibrary

    Objective-C

    @property NSMediaLibrary mediaLibraries

    Discussion

    This property will be one of the values in the NSMediaLibrary constants.

    You can set the value to use a specific library (image, audio or movie). You can also read the value to determine which is currently displayed.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.9 and later.

  • These constants are masks used to configure a Media Library Browser to display specific types of media. Combined masks are not yet supported. In other words, only one nonzero mask value is supported at a time. If masks are combined, the lowest mask value is used.

    Declaration

    Swift

    struct NSMediaLibrary : RawOptionSetType { init(_ rawValue: UInt) init(rawValue rawValue: UInt) static var Audio: NSMediaLibrary { get } static var Image: NSMediaLibrary { get } static var Movie: NSMediaLibrary { get } }

    Objective-C

    enum{ NSMediaLibraryAudio = 1UL << 0, NSMediaLibraryImage = 1UL << 1, NSMediaLibraryMovie = 1UL << 2 }; typedef NSUInteger NSMediaLibrary;

    Constants

    • Audio

      NSMediaLibraryAudio

      Display audio media.

      Available in OS X v10.9 and later.

    • Image

      NSMediaLibraryImage

      Display image media.

      Available in OS X v10.9 and later.

    • Movie

      NSMediaLibraryMovie

      Display movie media.

      Available in OS X v10.9 and later.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.9 and later.