NSStackView not respecting distribution setting when nested inside a NSViewController on macOS 13.6
This might be a silly question, but I've been researching this but I'm refactoring my project and I'm experiencing an issue with `NSStackView` where it doesn't seem to respect the distribution setting when nested inside a custom `NSViewController`... I'm using macOS 13.6, and I've set up the stack view as follows: ```swift class MyViewController: NSViewController { @IBOutlet weak var stackView: NSStackView! override func viewDidLoad() { super.viewDidLoad() setupStackView() } private func setupStackView() { // Create some views let view1 = NSView() let view2 = NSView() let view3 = NSView() stackView.addArrangedSubview(view1) stackView.addArrangedSubview(view2) stackView.addArrangedSubview(view3) // Set distribution stackView.distribution = .fillEqually } } ``` I expected the three subviews to fill the available space equally, but instead, they seem to be taking up different sizes based on their intrinsic content size. I even tried to manually set the `translatesAutoresizingMaskIntoConstraints` property of each subview to `false`, but that didn't help either. I also noticed this warning in the console when I run the app: ``` Warning: NSStackView does not support distribution 'NSStackViewDistributionFillEqually' because the arranged views do not have an intrinsic content size. ``` I read through the Apple documentation and it appears that `NSStackView` requires proper constraints to work correctly. All views I added have been initialized without explicit width and height constraints, but should I be adding those constraints manually? What am I missing here? Any help would be greatly appreciated! I'm developing on Ubuntu 20.04 with Swift. This is my first time working with Swift 3.10. What would be the recommended way to handle this?