Questions tagged [nsstackview]

The `NSStackView` is an OS X AppKit class introduced in OS X 10.9. It represents a horizontal or vertical stack of views.

From Apple's docs:

(NSStackView) is used to layout horizontal or vertical stacks of views using auto layout. Necessary constraints will automatically be created and modified when adding and removing views from a stack view to maintain a cohesive layout. This behavior is extended by customizing various properties of the stack view and the views it holds. Decreasing the clipping resistance priority allows the stack view to become smaller than the the minimum required to hold the provided views. Depending on the visibility priority associated with the internal views, they may either overflow and clip off the side, or drop from the view hierarchy. These dropped views are still retained by the stack view, and will be reattached if the stack view becomes the necessary size. Views can be forced to be dropped or reattached by setting the necessary visibility priority.

47 questions
-1
votes
2 answers

How to hidden the sub NSView according to the window size in Mac OS?

I am coding an MacOS app with swift. The main layout in the window is like follows: The NSStackView has a sideBar (NSTableView) and a NSView. What I want to achieve is listed here: The width of the sideBar is fixed when changing the window…
david
  • 842
  • 2
  • 8
  • 25
-1
votes
2 answers

What insane Autolayout logic is this?

I create a new view controller. I add a vertical stack to it. Spacing = 0, Alignment = Center X, Fill Equally. I constrain it to the 4 edges of its superview with space = 0.\ I add 3 horizontal stacks inside the main stack. For each of the the…
Duck
  • 34,902
  • 47
  • 248
  • 470
1 2 3
4