Instance Method

removeView(_:)

Removes a specified view from the stack view.

Declaration

func removeView(_ view: NSView)

Parameters

aView

The view you want to remove from the stack view.

Discussion

This method removes a view from a stack view whether the view is attached or detached. For an attached view only, you can alternatively call the removeFromSuperview() method on the view.

See Also

Adding and Removing Views

func addView(NSView, in: NSStackView.Gravity)

Adds a view to a stack view gravity area, at the end of the gravity area.

func insertView(NSView, at: Int, in: NSStackView.Gravity)

Adds a view to a stack view gravity area at a specified index position.

func setViews([NSView], in: NSStackView.Gravity)

Specifies an array of views for a specified gravity area in the stack view, replacing any views previously assigned to the gravity area.