Mac Developer Library

Developer

AppKit Framework Reference NSAppearanceCustomization Protocol Reference

Options
Deployment Target:

On This Page
Language:

NSAppearanceCustomization

Use the NSAppearanceCustomization protocol to get or set the appearance of a view, or to get the appearance that an offscreen view will use when it draws onscreen in the future.

Inheritance


Not Applicable

Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


Available in OS X v10.9 and later.
  • appearance appearance Required Property

    The appearance of the receiver, in an NSAppearance object. (required)

    Declaration

    Swift

    var appearance: NSAppearance? { get set }

    Objective-C

    @property(strong) NSAppearance *appearance

    Discussion

    The default value for this property is nil, which means that the receiver uses the appearance it inherits from the nearest ancestor that has set an appearance. When you set appearance to a non-nil value, the receiver and the views it contains use the specified appearance.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.9 and later.

  • The appearance that will be used when the receiver is drawn onscreen, in an NSAppearance object. (read-only) (required)

    Declaration

    Swift

    var effectiveAppearance: NSAppearance { get }

    Objective-C

    @property(readonly, strong) NSAppearance *effectiveAppearance

    Discussion

    The default value for this property is provided by the nearest ancestor of the receiver that has set an appearance.

    You can use this property to ensure that an offscreen view sets the appropriate current appearance when it draws onscreen.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.9 and later.