NSAppearanceCustomization Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in OS X v10.9 and later.
Declared in
NSAppearance.h

Overview

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.

Tasks

Getting and Setting Appearance

Properties

appearance

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

@property(retain) 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.

Availability
  • Available in OS X v10.9 and later.
Declared In
NSAppearance.h

effectiveAppearance

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

@property(readonly) 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.

Availability
  • Available in OS X v10.9 and later.
Declared In
NSAppearance.h