setCustomSpacing(_:after:)
Specifies the custom spacing, in points, between a specified view and the view that follows it in the stack view.
Declaration
func setCustomSpacing(_ spacing: CGFloat, after view: NSView)Parameters
- spacing:
The custom trailing space to use between the
aViewview and the one that follows it, in points.Default value is Usedefaultspacing, which indicates that the view does not use custom spacing.
- view:
The view whose trailing spacing you are setting.
Discussion
For a horizontal stack view, this method sets custom spacing between a specified view and the view to its right when the user interface direction is left to right. (See the inherited userInterfaceLayoutDirection property for information on layout direction.) For a vertical stack view, this method sets custom spacing below a specified view.
If you set custom spacing for a view, it overrides the stack view’s default spacing for that view, as set in the spacing property.
A stack view retains custom spacing across layout updates. Custom spacing for a view is lost if you remove the view from the stack view or specify a new value.