toolbarItemPresentationSize
The presentation size of a toolbar item in an AppKit toolbar.
Declaration
var toolbarItemPresentationSize: UINSToolbarItemPresentationSize { get }Mentioned in
Discussion
NSToolbar supports various display modes that affect the amount of space available for displaying toolbar items. If you use NSUIViewToolbarItem to host a UIView in an NSToolbar when you build your app with Mac Catalyst, that view receives information about its expected size through this trait. Use this trait to make any necessary adjustments to your custom view when the trait collection changes, such as when the toolbar switches to a new display mode.
The default value of this trait is UINSToolbarItemPresentationSize.unspecified when an NSToolbar doesn’t host the view.
See Also
Retrieving interface-related traits
userInterfaceStyleUIUserInterfaceStyleuserInterfaceIdiomUIUserInterfaceIdiomuserInterfaceLevelUIUserInterfaceLevellayoutDirectionUITraitEnvironmentLayoutDirectionresolvesNaturalAlignmentWithBaseWritingDirectionaccessibilityContrastUIAccessibilityContrastlegibilityWeightUILegibilityWeightactiveAppearanceUIUserInterfaceActiveAppearance