2019-03-18a minute read (About 126 words)How to make scrollable vertical NSStackViewIssue #173 You might need to flip NSClipView 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152import AppKitimport Anchorsimport Omniafinal class ScrollableStackView: NSView { final class FlippedClipView: NSClipView { override var isFlipped: Bool { return true } } override init(frame frameRect: NSRect) { super.init(frame: frameRect) setup() } required init?(coder decoder: NSCoder) { fatalError() } let stackView: NSStackView = withObject(NSStackView()) { $0.orientation = .vertical } private let scrollView: NSScrollView = NSScrollView() private func setup() { addSubview(scrollView) scrollView.hasVerticalScroller = true scrollView.drawsBackground = false activate( scrollView.anchor.edges ) let clipView = FlippedClipView() clipView.translatesAutoresizingMaskIntoConstraints = false clipView.drawsBackground = false scrollView.contentView = clipView activate( clipView.anchor.edges.equal.to(scrollView.anchor) ) scrollView.documentView = stackView stackView.translatesAutoresizingMaskIntoConstraints = false activate( clipView.anchor.left.top.right.equal.to(stackView.anchor) ) }} Read more https://stackoverflow.com/questions/10016475/create-nsscrollview-programmatically-in-an-nsview-cocoa/55219153#55219153 #swiftmacOS