Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSAppearanceMBS class.
NSAppearanceMBS.appearance(item as Variant) as NSAppearanceMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
Version 20.5 of MBS Plugin can accept application or NSApplicationMBS objects to query appearance of whole app.
Version 24.2 accepts NSMenuMBS, MenuItem, DesktopMenuItem and NSMenuItemMBS objects here.
NSAppearanceMBS.appearanceNamed(name as string) as NSAppearanceMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
name: The name of a standard or custom appearance.
Returns a standard or custom appearance object.
When you specify a standard appearance name—such as NSAppearanceNameAqua—this method returns a built-in appearance. If you specify a custom appearance name, this method searches the main bundle for an appearance file that has the specified name.
Available in OS X v10.9 and later.
See also:
Some examples using this method:
NSAppearanceMBS.appearanceNamed(name as string, bundle as NSBundleMBS) as NSAppearanceMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
name: The name of the appearance file to search for, without any path information.
bundle: The bundle in which to search for the appearance file. If bundle is nil, this method searches in the main bundle.
Returns an initialized appearance object, or nil if an error occurs.
Available in OS X v10.9 and later.
See also:
NSAppearanceMBS.Available as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSAppearanceMBS.currentAppearance as NSAppearanceMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
When a UI element draws on the screen, it automatically sets the appearance that it’s using on the current thread.
Available in OS X v10.9 and later.
Some examples using this method:
NSAppearanceMBS.effectiveAppearance(item as Variant) as NSAppearanceMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
Available in OS X v10.9 and later.
Version 20.5 of MBS Plugin can accept application or NSApplicationMBS objects to query appearance of whole app.
Version 24.2 accepts NSMenuMBS, MenuItem, DesktopMenuItem and NSMenuItemMBS objects here.
NSAppearanceMBS.NSAppearanceNameAccessibilityHighContrastAqua as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 19.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Don't assign an NSAppearanceMBS object with this type directly to one of your views. Instead, assign a light appearance to your view. AppKit then returns this type when the user enables the Increase Contrast option in the Accessibility system preferences.
Available on MacOS 10.14 or newer.
NSAppearanceMBS.NSAppearanceNameAccessibilityHighContrastDarkAqua as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 19.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Don't assign an NSAppearanceMBS object with this type directly to one of your views. Instead, assign a dark appearance to your view. AppKit then returns this type when the user enables the Increase Contrast option in the Accessibility system preferences.
Available on MacOS 10.14 or newer.
NSAppearanceMBS.NSAppearanceNameAccessibilityHighContrastVibrantDark as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 19.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Don't assign an NSAppearanceMBS object with this type directly to one of your views. Instead, assign a dark appearance to your view. AppKit then returns this type when the user enables the Increase Contrast option in the Accessibility system preferences and the view's allowsVibrancy property is true.
Available on MacOS 10.14 or newer.
NSAppearanceMBS.NSAppearanceNameAccessibilityHighContrastVibrantLight as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 19.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Don't assign an NSAppearanceMBS object with this type directly to one of your views. Instead, assign a light appearance to your view. AppKit then returns this type when the user enables the Increase Contrast option in the Accessibility system preferences and the view's allowsVibrancy property is true.
Available on MacOS 10.14 or newer.
NSAppearanceMBS.NSAppearanceNameAqua as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSAppearanceMBS.NSAppearanceNameDarkAqua as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 20.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSAppearanceMBS.NSAppearanceNameLightContent as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSAppearanceMBS.NSAppearanceNameVibrantDark as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Available on Mac OS X 10.10 and newer.
Should only be set on an NSVisualEffectView, or one of its container subviews.
Some examples using this method:
NSAppearanceMBS.NSAppearanceNameVibrantLight as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Available on Mac OS X 10.10 and newer.
Should only be set on an NSVisualEffectView, or one of its container subviews.
NSAppearanceMBS.setAppearance(item as Variant, appearance as NSAppearanceMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
Version 20.5 of MBS Plugin can accept application or NSApplicationMBS objects to set appearance of whole app.
Some examples using this method:
NSAppearanceMBS.setCurrentAppearance(appearance as NSAppearanceMBS = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
appearance: The NSAppearance object that should be used for the window or view, or nil to specify the default appearance.
When you set an appearance on a window, all views in that window—including the window background and controls in both the frame and content areas—use that appearance. By default, AppKit sets the current appearance for standard windows and views during window drawing, so you don't need to use this method unless you want to change the current appearance of a specific window or view.
You can use this method to set the current appearance for an offscreen view to the appearance that will be used when the view is drawn. To do this, use the offscreen view’s effectiveAppearance for the appearance parameter.
Available in OS X v10.9 and later.
Some examples using this method:
The items on this page are in the following plugins: MBS MacFrameworks Plugin.