Platforms to show: All Mac Windows Linux Cross-Platform
NSAppearanceMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa | MBS MacFrameworks Plugin | 14.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
An NSAppearance object represents a file that specifies a standard or custom appearance that applies to a subset of UI elements in an app. An app can contain multiple appearance files and—because NSAppearance conforms to NSCoding—you can use Interface Builder to assign UI elements to an appearance.
Typically, you customize a window by using Xcode to create an appearance file that contains the views you want to customize and the custom art that should be applied to them. Xcode transforms the file’s art content into a runtime format that AppKit can draw when the specified views are displayed.
If the art for a specific view can’t be found, AppKit searches for the art in the appearances of the view’s ancestors. A nil appearance means that a view uses the default Aqua appearance; a non-nil appearance means that the view uses an ancestor’s appearance.
When AppKit draws a control, it automatically sets the current appearance on the current thread to the control’s appearance. The current appearance can influence the actual drawing path and the return values you get when you access system fonts and colors. The current appearance also affects the appearance of text and images, such as the text and template images that can be displayed in a toolbar.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 3 properties
- property allowsVibrancy as Boolean
- property Handle as Integer
- property name as String
- method Constructor Private
- 17 shared methods
- shared method appearance(item as Variant) as NSAppearanceMBS
- shared method appearanceNamed(name as string) as NSAppearanceMBS
- shared method appearanceNamed(name as string, bundle as NSBundleMBS) as NSAppearanceMBS
- shared method Available as boolean
- shared method currentAppearance as NSAppearanceMBS
- shared method effectiveAppearance(item as Variant) as NSAppearanceMBS
- shared method NSAppearanceNameAccessibilityHighContrastAqua as string
- shared method NSAppearanceNameAccessibilityHighContrastDarkAqua as string
- shared method NSAppearanceNameAccessibilityHighContrastVibrantDark as string
- shared method NSAppearanceNameAccessibilityHighContrastVibrantLight as string
- shared method NSAppearanceNameAqua as string
- shared method NSAppearanceNameDarkAqua as string
- shared method NSAppearanceNameLightContent as string
- shared method NSAppearanceNameVibrantDark as string
- shared method NSAppearanceNameVibrantLight as string
- shared method setAppearance(item as Variant, appearance as NSAppearanceMBS)
- shared method setCurrentAppearance(appearance as NSAppearanceMBS = nil)
This class has no sub classes.
Some properties using for this class:
- MKMapSnapshotOptionsMBS.appearance as NSAppearanceMBS
Some examples using this class:
Blog Entries
- MBS Xojo Plugins, version 24.2pr4
- MBS Xojo Plugins, version 21.5pr3
- MBS Xojo Plugins, version 20.5pr1
- MBS Xojo Plugins, version 20.3pr10
- MBS Xojo Plugins, version 19.4pr1
- MBS Xojo / Real Studio Plugins, version 16.2pr2
- MBS Xojo / Real Studio Plugins, version 15.1pr7
- New for Mac OS X 10.10 in MBS Xojo Plugins
- MBS Xojo / Real Studio Plugins, version 14.3pr10
Release notes
- Version 24.2
- Improved effectiveAppearance and appearance methods in NSAppearanceMBS class to allow passing NSMenuMBS, NSMenuItemMBS, MenuItem or DesktopMenuItem objects.
- Version 21.5
- Fixed issues with NSAppearanceMBS class and newer classes.
- Version 20.5
- Changed setappearance, appearance and effectiveAppearance methods in NSAppearanceMBS class to accept application or NSApplicationMBS objects.
- Version 20.3
- Added NSAppearanceNameDarkAqua shared method to NSAppearanceMBS class for dark mode.
- Version 19.4
- Added more constants to NSAppearanceMBS class.
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
NSAnimationMBS - NSAppleEventDescriptorMBS