NSScrollView scrollToTop
问题 Does anyone know the correct way to scroll the NSScrollView to the top? I was looking for an equivalent to the UIView's scrollToTop method. This is what I have so far, but its not quite right under all situations [self.contentView scrollToPoint:NSMakePoint(0, MAX(contentView.frameHeight, ((NSView*)self.documentView).frameHeight))]; 回答1: Updated for Swift 5 : If your document view is flipped: scrollView.documentView?.scroll(.zero) otherwise: if let documentView = scrollView.documentView {